Jump to content
IGNORED

Graph2fnt


emkay

Recommended Posts

Why is Graph2Font setting a quad-width missile to single-width on the output files?

 

I'm seeing this in the ASM output, where the missile size register is being set to zero (together with all the unused missile positions).

 

x2 lda #$00

sta hposm0

sta hposm2

sta hposm3

sta sizem

 

Also, there are no errors when doing a "Check" on each line's status (DLI changes per line); status for all lines are listed as "OK".

 

please, i need any G2F file with "bug" for testing

 

screenshots are insufficient

Link to comment
Share on other sites

please, i need any G2F file with "bug" for testing

screenshots are insufficient

 

You... you're still supporting this? Awesome!

I have so many things that I want to say to you! icon_biggrin.gif

 

I've moved onto trying some of the mutli-image formats (scrollers, animation). I created a vertical scroller, and it seems to generate a new assembly language file if you don't already have one (which is totally what I want and need). But there were some funny things towards the top of the assembly listing. Take a look...

pmg    = $c000

$D000    = $D000
$D001    = $D001
$D002    = $D002
$D003    = $D003
$D004    = $D004
$D005    = $D005
$D006    = $D006
$D007    = $D007
$D008    = $D008
$D009    = $D009
$D00A    = $D00A
$D00B    = $D00B
$D00C    = $D00C
$D012    = $D012
$D013    = $D013
$D014    = $D014
$D015    = $D015
$D016    = $D016
$D017    = $D017
$D018    = $D018
$D019    = $D019
$D01A    = $D01A
$D01B    = $D01B
$D409    = $D409
vscrol    = $d405

I can't speak for other compilers, but for many of these lines (such as "$D014 = $D014"), MADS just won't compile with attempts to define a constant as a constant. I'm thinking that this is a mistake, though, because once I comment the "$Dxxxx = $Dxxxx" lines, it is improved, but it still won't compile because chbase is not defined. So I have to add "chbase = $D409" (which, as it turns out, was the last memory location in the list above that I had to comment out). It looks like something needs fixed here?

 

Once I fix that, it compiles just fine, and sure enough, it scrolls up and down, and mostly works, but there is some corruption towards the top of the scrolling window:

 

1. As the image scrolls up (revealing new content at the bottom of the screen), it'll start with about 16 pixel rows of corrupted data, and then fresh lines will scroll up and replace the bad data until everything looks perfect, then it'll jump back to the first 16 pixels being corrupted again and repeating the cycle.

 

2. As the image scrolls down (revealing new contact at the top of the screen), it starts out perfect, but then up to about 16 pixel rolls of corrupted data will scroll into the page from the top, and then it'll jump back into being perfect again and repeating the cycle.

 

Do I need to bake you a fresh example and attach the files for you to look at it?

I'm using Altirra to test with. I tried both NTSC and PAL, but it didn't change the issue.

 

Oh! Unrelated, I wanted to show you this...

; For a vertical scroller, adjust the number of character rows which are shown
; on screen. This is what the image will scroll up and down inside of.
height    = 14

; For a vertical scroller, limit how many characters down the scroller will
; show inside of the display window.
ile    = 55-height

I don't know if you're accepting suggestions for comments to put inside the assembly code, but I think that I and others would appreciate hints on what different variables are responsible for, and what we might be able to customize.

 

Beyond that, I'm having trouble finding the best way to divide up an image and import it into Graph2Font for scrolling. It looks like I need sections that are 240 pixels tall in order to fill a page in Graph2Font. If I work on an image in Atari Graphics Studio v3.0.1 (which is what I've been doing), it limits my 4-color images to 192 pixels tall, so I have to work around the large gaps that are created by the mismatch. I was hoping you had some suggestion here?

 

Thanks for reading this, the excellent program, and for the continued support,

jmccorm

  • Like 1
Link to comment
Share on other sites

 

 

Beyond that, I'm having trouble finding the best way to divide up an image and import it into Graph2Font for scrolling.

 

create textfile *.VSC with G2F filenames

 

file1.g2f
file2.g2f

 

load to G2F (works fine at first time), move mouse roller up/down

  • Like 1
Link to comment
Share on other sites

 

create textfile *.VSC with G2F filenames

file1.g2f
file2.g2f

load to G2F (works fine at first time), move mouse roller up/down

 

Worked great, thanks! Those other two issues I mentioned (the bad constants in assembler, and the bad scrolling in the self-compiled binary), are these issues that look like bugs that you'll be working on?

 

I have something else for you, and it is much more nebulous.

 

Using Graph2Font v4.0.1.3, I'm having trouble importing images which I've specially reduced to a low number of colors before importing. I might have an image with 4 colors. Or 5 colors. But they import totally wrong and I have to fight Graph2Font to get them in... and I usually lose. So, I've created a very basic illustrative example. Here is the image "pongf" in three different image file formats. Two of the formats have encoded it as four colors. I believe BMP decides to adds "black" as a fifth but otherwise unused color. But when I try to open them in Graph2Font, it always opens as a horrible 2-color image. (Yes, I'll usually pre-scale it to 160 pixels across rather than import with 320 pixels wide.)

 

I've tried all four modes. I was using 2x1 pixels, screen normal, GTIA mode. It just isn't opening it correctly. Thoughts? My only guess is that maybe I need to exaggerate the palette differences because Graph2Font is condensing/collapsing the colors when I don't want it to?

 

Sample 4-color Image:

post-18231-0-76182500-1516393617.png

 

The Best I Can Convince Graph2Font to Import That Specific File As:

(This is actually two-color, but grays were introduced when my image capture program rescaled it.)

post-18231-0-00161000-1516396675.png

 

Zipped Images (to make sure they're not modified in transit):

pongf.zip

 

EDIT: This was just a manufactured example (which turned out to have very similar colors). What I really want to be able to tell Graph2Font, when it is opening a file, is this: "Take my 4-color image, assign the pixels with the provided color index numbers, come as close as you can to the palette, and don't do anything else. Also don't try swapping colors between lines. Just import it like a normal paint program, and let me do my own tweaking with Graph2Font's cool features." Now, I realize this becomes more a problem when I try to use 5 colors. But this seems to be my continual fight with Graph2Font. I'm probably using it wrong?

Edited by jmccorm
Link to comment
Share on other sites

RGB values is to close, G2F change RGB to Atari GTIA color valiues

function RGBtoYUV(const cl: TColor): tYUV;
var r,g,b: byte;
begin
 
 r:=GetRValue(cl);
 g:=GetGValue(cl);
 b:=GetBValue(cl);
 
 Result.y := 0.299*r + 0.587*g + 0.114*b;
 Result.u := 0.565*(b - Result.y);
 Result.v := 0.713*(r - Result.y);
 
end;
 
 
function rgbRead(const cl: TColor): byte;
var a,b: tYUV;
    i: byte;
    x,p: double;
begin
 
 Result:=0;
 
 a:=RGBtoYUV(cl);
 
 x:=$ff*$ff+$ff*$ff+$ff*$ff;
 
 for i:=0 to 255 do begin
 
   b:=RGBtoYUV(AtariPal[i]);
 
   p := Sqr(b.y - a.y) + Sqr(b.u - a.u) + Sqr(b.v - a.v);
 
   if x>p then begin x:=p; Result:=i end;
 
  end;
 
end;

you must cheating, set colors with big diferences, like green, red, white

Edited by tebe
  • Like 1
Link to comment
Share on other sites

I think he means to cheat by setting the colors far apart so it renders correctly...

 

Thank you for taking the time to make sure that his meaning was clearly understood. Language is such an unfortunate barrier for us.

 

Also, I have some good news related to a major bug that I reported earlier...

 

I've moved onto trying some of the mutli-image formats (scrollers, animation). I created a vertical scroller, and it seems to generate a new assembly language file if you don't already have one (which is totally what I want and need). But there were some funny things towards the top of the assembly listing. Take a look...

 

pmg = $c000

 

$D000 = $D000

$D001 = $D001

[ ... ]

$D01B = $D01B

$D409 = $D409

vscrol = $d405

 

I can't speak for other compilers, but for many of these lines (such as "$D014 = $D014"), MADS just won't compile with attempts to define a constant as a constant. I'm thinking that this is a mistake, though, because once I comment the "$Dxxxx = $Dxxxx" lines, it is improved, but it still won't compile because chbase is not defined. So I have to add "chbase = $D409" (which, as it turns out, was the last memory location in the list above that I had to comment out). It looks like something needs fixed here?

 

Once I fix that, it compiles just fine, and sure enough, it scrolls up and down, and mostly works, but there is some corruption towards the top of the scrolling window:

 

On a hunch, I went into Special -> Options -> ASM file -> Constant labels, and I unchecked it. Then, when I saved the assembler files for my vertical scroller, the assembler output didn't try to redefine addresses as themselves, and once compiled, there were no errors, and the graphics were no longer corrupted at the top of the screen.

 

I'm not sure what constant labels is supposed to do, but turning it off fixed my problems.

 

Hope this helps Tebe find the issue.

 

Thanks all, I'm enjoying this program so much!

jmccorm

Edited by jmccorm
  • Like 2
Link to comment
Share on other sites

Are there any good video tutorials for Graph2Font? Language is not an issue as long as I can follow what they're doing. This appears to be a program where it is better to be shown by example rather than reading manuals or teasing out the commands on your own.

 

I'd totally love to watch a master at work, and I suspect there are others who would appreciate it just as much!

 

Any existing videos?

Anyone interested in teaching a hungry audience?

 

Thanks for listening to my request,

The jmccorm.

  • Like 2
Link to comment
Share on other sites

Are there any good video tutorials for Graph2Font? Language is not an issue as long as I can follow what they're doing. This appears to be a program where it is better to be shown by example rather than reading manuals or teasing out the commands on your own.

 

I'd totally love to watch a master at work, and I suspect there are others who would appreciate it just as much!

 

Any existing videos?

Anyone interested in teaching a hungry audience?

 

Thanks for listening to my request,

The jmccorm.

 

I second that :thumbsup: .

  • Like 2
Link to comment
Share on other sites

I'm not a master, it's not a video and it's not the latest version of graph2font... but maybe my old tut done in 2k10 helps a bit: http://www.atariage.com/forums/topic/172973-logomaker/page__view__findpost__p__2144931

 

... I found that one mentioned a bit above my tut: http://www.atariage.com/forums/topic/170075-druid-2-title-screen/page__view__findpost__p__2106250

Edited by pps
  • Like 3
Link to comment
Share on other sites

Are there any good video tutorials for Graph2Font? Language is not an issue as long as I can follow what they're doing.

 

You have to decide for yourself if they are good ;):

 

 

www.youtube.com/watch?v=fK5HJt0jrOs

www.youtube.com/watch?v=mpTxf0F12Go

www.youtube.com/watch?v=eXGhXhTpb2A

www.youtube.com/watch?v=KCY6AjjXqx8

Edited by Irgendwer
  • Like 5
Link to comment
Share on other sites

 

You're too modest. I was already familiar with many of the rules, but now I understand how to use the interface to add PMGs to the image, how to perform (and undo) simple palette changes in an image, and how to use the interface to resolve too many changes on a scan line. I'm already making improvements to the images I'm working on (by way of resolving 3rd and 4th color conflicts, and adding an additional color to small areas). Great!

 

I'm going to try pps' tutorial next.

Link to comment
Share on other sites

Feature requests:

 

1. Ability to swap work-areas while zoomed. I often need to copy details by hand. It is hard to copy if I have to swap work areas and then zoom back in. I also lose my color selection.

 

2. Filenames to be preserved on each work area. Currently, it wants to save them both as the same filename (the last used filename).

 

3. Compatibility with windows rescaling (fonts) and high resolution displays. Some words do not fit in their boxes. Cannot select option for filled rectangles. Some Graph2Font windows can be small and hard to see and to use on high resolution displays.

 

Thanks again for a fine piece of software!

Link to comment
Share on other sites

FBI Logo, 5 Color (no dithering, anti-aliasing, or player/missile graphics):

 

This generally turned out pretty well considering the limited resolution and the use of only 5 colors with no palette changes or player/missile graphics. That clean approach leaves open a lot of unused resources which can be used to further improve the picture.

 

I made this while developing my combination parody/demo/game. (Although I thought about it, no, this is completely unrelated to any potential "AtariLeaks" game unless this project falls through and I start looking for a Plan B.) Feel free to use or enhance this image. I'd like to ask that if you make improvements that you share them with the rest of us to use (if only for our own ominous anti-piracy/anti-drug/stay-in-school messages). No credit required, but appreciated, of course.

 

If you start to think that some of the yellow stars look a little like Jumpman, I ask that you please save that for my exclusive use as an in-game visual joke (as spare time and unused space makes possible).

 

If you're interested in using or enhancing this picture, some notes:

 

The NTSC and PAL aspect ratios were not corrected, leaving the circle a little wide. This was left as-is to take advantage of some of the extra pixels and to fill a bit more real-estate. It is difficult to create low resolution circular text, and the text holds up unless you specifically go to pick it apart. Still, I think that "BUREAU" needs the most improvement. No attempt was made at anti-aliasing or shadows. There should be just enough space at the bottom of the screen for any text you'd like to add. Although there is no real way to represent the 46 leaves of the laurels, the greenery should each probably be at least one pixel wider. The white banner below the shield should have the motto "FIDELITY, BRAVERY, INTEGRITY" which felt far too large in the limited space for me to make a blobbed attempt at. The two alternating gold colors on the outer-edge of the seal come from period-authentic arcade screens.

 

This logo is actually different and distinct from the FBI anti-piracy warning seal, but if you want to use or alter it for that purpose, that's fine. Most people won't know the difference between the two seals. Or care, probably.

 

If you want to improve the image with mid-scanline color changes or player-missile graphics or VBXE enhancements:

 

The area outside the shield was originally black (as were the laurels), but I had decided to repurpose that color register so that I could make the laurels green. You could change the laurels and the background (outside the shield) back to black. With player/missile graphics or a carefully timed mid-line color change, you might still be able to keep the laurels green. With more player/missile graphics, you could mix in another green or black to better fill out the laurels or to create their shadows. The stripes in the middle seem like they're good enough, but they should be a very pure red-and-white.

 

If you've got extra resolution, you should be able to clean up the serif font of the circular text quite nicely and also render the missing moto on the white banner. With extra resolution and black, you can add back in all the tiny shadows. If you've just got a wider palette of colors, anti-aliasing would be a big plus, along with more gold tones on the stars and a back-side color for the curling white banner. The color gradient along the edge of the logo is probably not worth the trouble of restoring unless you're a purist, and if you're going that far, you might as well just convert everything from scratch with the original image.

IMAGES (Atari 8-bit and actual):

post-18231-0-56442400-1516911831.pngpost-18231-0-83511200-1516911864.png

 

FILES (Atari 8-bit executable and compresses G2F graphics file):

fbi-logo-orig-7b.xex

fbi-logo-orig-7b-g2f.zip

 

Enjoy.

Edited by jmccorm
  • Like 3
Link to comment
Share on other sites

I'm not a master, it's not a video and it's not the latest version of graph2font... but maybe my old tut done in 2k10 helps a bit: http://www.atariage.com/forums/topic/172973-logomaker/page__view__findpost__p__2144931

 

... I found that one mentioned a bit above my tut: http://www.atariage.com/forums/topic/170075-druid-2-title-screen/page__view__findpost__p__2106250

I wasn't aware of the optimizing feature, so I may start using that, although I wish there was a solid explanation of how optymizing ends up storing the fonts and/or pixels differently. Does it make a robust effort to reuse the custom fonts, or does it pack and encoded the data differently (requiring slightly different assembler code to use), or something else? What are some situations where I *wouldn't* want to use it?

 

As I was reading, it wasn't obvious to me but I finally figured out that HxD was actually the name of a hex editor. Is that one particularly well known and liked?

 

I see that you coded your own assembly rather than use or modify what Graph2Font generated. That seems like a lot of work. Was it for efficiency, or was it to avoid having to modify their code to allow for a truncated .SCR file, or... ?

 

Thanks for the good doc. I've almost completed my own tutorial on how to use Photoshop to reduce images to 4 or 5 colors and then convince Graph2Font to import them. One of my greatest struggles has been in figuring out the best way to downconvert and import high-quality graphics into the program.

 

Cheers,

the jmccorm

 

EDIT: And while I'm here, updates to the FBI Seal... hopefully for the better?

fbi-logo-orig-7d.zipfbi-logo-orig-7d.xex

 

post-18231-0-86576700-1516927778.png

Edited by jmccorm
  • Like 5
Link to comment
Share on other sites

HxD is my fav. hex editor, as it is small and handy.

 

I used my own asm code, as it shows how you can use graph2font to convert graphics to font and can include it in your own code. The thread I posted the tut was asking for some infos about how to convert a logo, so it's often used in own code.

 

The optimization in g2f is good for using just as many ram that is really needed. A not optimized picture needs 9 fonts. So it uses a lot of memory. Have a look at show chars (ctrl-h) option and you can see it clear. -> In settings (special->limitations) you can limit the use of chars in a font, so that there is room for own chars.

I wasn't aware of the optimizing feature, so I may start using that, although I wish there was a solid explanation of how optymizing ends up storing the fonts and/or pixels differently. Does it make a robust effort to reuse the custom fonts, or does it pack and encoded the data differently (requiring slightly different assembler code to use), or something else? What are some situations where I *wouldn't* want to use it?

As I was reading, it wasn't obvious to me but I finally figured out that HxD was actually the name of a hex editor. Is that one particularly well known and liked?

I see that you coded your own assembly rather than use or modify what Graph2Font generated. That seems like a lot of work. Was it for efficiency, or was it to avoid having to modify their code to allow for a truncated .SCR file, or... ?

Thanks for the good doc. I've almost completed my own tutorial on how to use Photoshop to reduce images to 4 or 5 colors and then convince Graph2Font to import them. One of my greatest struggles has been in figuring out the best way to downconvert and import high-quality graphics into the program.

Cheers,
the jmccorm

 

Link to comment
Share on other sites

g2f v4.0.2.2 (support MCH file form Atari Rasta Juice)

Atari Rasta Juice - new program, convert PNG (8bpp, 320x1600 max) to GED-- mode (GRAPHICS 15 or GRAPHICS 10)

 

I'm sad that I developed some skills to convert down high-color PNGs and I even wrote a doc on it that I was about to release! But I'm happy to see that you've worked on this functionality, so thank you very very much.

 

A minor snag: My virus scanner intercepted it, stopped it from loading, and decided that it wanted to send a copy of the binary back to their headquarters for further investigation. Perhaps it is because, in part, that it requires admin rights? Is it possible to build a copy that doesn't require admin rights?

Edited by jmccorm
Link to comment
Share on other sites

 

EDIT: And while I'm here, updates to the FBI Seal... hopefully for the better?

attachicon.giffbi-logo-orig-7d.zipattachicon.giffbi-logo-orig-7d.xex

attachicon.giffbi-logo-orig-7d.png

 

I ran into an issue when modfying this image, and I did some reading. Here what probably is a stupid question:

 

The image (above) is in 5 color mode. On this picture, I enabled the feature Special -> Mode -> GED+ -> Disable Badlines. When I did this, COLPF2 (Color2, which was green) disappeared completely from the picture. My understanding is that this is using Konop's Mode, and we're changing the character set with every 8 vertical lines, but the video memory for the line itself... does it stay the same every time? Am I not able to switch between COLPF2 and COLPF3 because it doesn't also copy video memory (potentially ~40 different characters for each line to capture which ones are inverse), or is something else going on?

 

Thanks, all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...