Jump to content
IGNORED

Coleco Font ROM Address


Kiwi

Recommended Posts

I was wondering where the font is located on the memory map. I want to know for future reference or now, just in case I need to gain back ROM space to cram more stuff into 32KB. Upload_default_ascii(BOLD_ITALIC); command just uploads content to vram 0x0000-0x0400. I do just need to write to VRAM address 0x0100-0x02FF. Something like put_vram(0x0100,0x0???,512) might work. I'm not sure if the fonts are encoded in someway. I do think that the lower case, bold, italic are generated from the original Coleco font images. So I should be able to upload the original font image to VRAM.

Link to comment
Share on other sites

Cool, I got the font from the BIOS to load!! Thank you nanochess!

 

put_vram(0x0100,0x15a3,512); works. 0x15a3 will trigger the SDCC warning.

 

Rockcutter.c:5344: warning 154: converting integral to pointer without a cast
from type 'const-int literal'
to type 'void generic* fixed'

 

I just ignore the warning.

  • Like 1
Link to comment
Share on other sites

It /is/ a good policy to always fix your warnings for a clean build - but I'll just throw in a secondary warning about casting. Do that only when you KNOW it's right, because it tells the compiler not to check that you are doing the right thing. ;) In this case it's completely correct, you are typing an integer and you honestly mean for it to be a memory pointer. But I've seen people who resolve type warnings every time with a cast without checking why it was thrown, which isn't always the right answer. (for instance, used the wrong variable, defined something as not being a pointer when it was supposed to be, meant to dereference, etc) ;)

Link to comment
Share on other sites

I assumed that put_vram(0x0100,0x15a3,512); will translate to

xor a
ld hl,$15a3
ld de,$0100
ld bc,512
call WRITE_VRAM

 

It'll work anyway. Pointer name address will change into bytes after compiling.

And yes, I learned the hardway of ignoring warnings. So much red, that it wouldn't show what caused the fatal error and refuse to compile. It changed my habit how I code and fix my warnings when it pops up.

Link to comment
Share on other sites

Of course it will work anyway. Adding the (void*) doesn't change the generated code in any way, it just tells the compiler that yes, you meant that. Warnings are there to help you understand that the compiler discovered an ambiguity, and it might not have made the right choice. :)

  • Like 1
Link to comment
Share on other sites

From my experience taking care of warning also allow you to save ROM space as well.

 

Just by resolving the warning in Knight 'n More , i just save about 200 bytes!!!. That's enormous knowing that the ROM before i take care of warning was exactly 32768 bytes. It gave me the fresh air i needed to complete the game!

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...