You are not logged in.
Pages: 1
I found a file called sgb_border.asm, and I need to make SGB border show the words "Pocket Monsters" like in the japanese version. But I don't understand where I can write the number of tiles I want to show. Can you help me?
Offline
Hey!
I think what you want to do is in image format, rather than text format.
There's a PNG file in gfx/red and gfx/blue which shows the images (and text) of the SGB borders (sgbborder.png). You just edit it, change it to 2bpp format using Cygwin, and you're good to go :)
Offline
change it to 2bpp format using Cygwin
This is a redundant step. Building will do this automatically.
Offline
Hey!
I think what you want to do is in image format, rather than text format.
There's a PNG file in gfx/red and gfx/blue which shows the images (and text) of the SGB borders (sgbborder.png). You just edit it, change it to 2bpp format using Cygwin, and you're good to go :)
So I have this sgbborder.png file and I see the text.
MechanicalPen has told me how to edit the tiles displayed on the title screen, but can I do it with tiles of SGB border? Maybe there is some kind of .asm file where I can write list of tiles?
Offline
That information is in gfx/red/sgbborder.map and gfx/blue/sgbborder.map
Try opening those files in a hex editor and setting the width to 64 ($40)
Each tile gets two bytes. The first byte is the tile id, from gfx/red/sgbborder.png and gfx/blue/sgbborder.png. The second byte is the attribute byte for that tile.
The format for the attribute byte appears to work like this:
bit 0: always 0
bit 1: always 0
bit 2 & 3: palette id
bit 4: use sgb border palettes if set
bit 5: always 0
bit 6: mirror tile if set
bit 7: always 0
Bit 4 means that if it is unset, then bits 2 & 3 refer to palettes 0-3 of the currently loaded in-game palettes.
If bit 4 is set, then bits 2 & 3 refer to palettes 0-3 from the sgb border palettes defined in data/sgb_border.asm
It's possible that bits 0, 1, 5, and 7 have some actual purpose regarding the sgb in general, but it seems like Red only uses bits 2 and 3 for the palette id and bit 6 to mirror the tile.
This results in the following bytes used for the attribute byte:
$10 - palette id 0 (pink/red)
$50 - palette id 0 (pink/red) mirrored
$14 - palette id 1 (green/brown)
$54 - palette id 1 (green/brown) mirrored
$18 - palette id 2 (yellow/blue)
$58 - palette id 2 (yellow/blue) mirrored
Also, I moved this thread to Help/Question where it belongs.
Offline
...Can you show a picture which illustrates the correlation between the hex code and the SGB border? Because I think I might be able to understand the border's language better that way.
Thanks!
EDIT REASON: Accidentally replied too soon
Last edited by Fotomac (2016-11-22 03:58:42)
Offline
I explained the whole format already. Which part needs more clarification?
Since you didn't ask a specific question, hopefully this illustration will help.
Offline
I think I got it now. Thanks for the illustration!
Offline
I explained the whole format already. Which part needs more clarification?
Since you didn't ask a specific question, hopefully this illustration will help.
Thank you for help!
Offline
Pages: 1