It is currently Mon Jul 15, 2019 7:14 pm

All times are UTC - 7 hours

Forum rules

Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed May 01, 2019 10:38 pm 
User avatar

Joined: Fri Jan 04, 2019 5:31 pm
Posts: 35
Location: France, right of a pile of consoles
My GB code is uttely bad, for a fairly unique but stupid reason: at some point the SD card I was using to feed my flashcart GB ROMs ceased working, so I kept running the same (at the time broken) ROM. SO I ended up fixing problems and things that weren't (to my great confusion). Since I wasn't planning to use a VCS by the time I realized this, I was left with very very botched code.
As for the memory map, I thus fell back to areas I knew were correct, ie. the small regions used by games to hot-patch the SGB firmware.

That said, I have identified other buffers that are most certainly free, though I am unsure whether their location is preserved across firmware revisions.
7E:2800-2FFF BG1Tilemap
7E:3000-3FFF SystemPalettes
7E:4000-4FFF ATFBuffer          ; Buffer for the "attribute files" sent by ATR_TRN
7E:5000-67FF Framebuffer1
7E:6800-7FFF Framebuffer2       ; There's double-buffering, apparently
7E:8000-8FFF BorderTilesBuffer1
7E:9000-9FFF BorderTilesBuffer2 ; There are two buffers, one per "half" of the possible BG1 tiles. This appears to store the "user-specified" tiles, not the currently-used ones
7E:A000-A7FF BorderTilemapBuffer
7E:A800-AFFF GBTilemapBuffer ; I'm unsure why this is there, but I don't remember if this gets copied to the BG3 tilemap more than once
7E:C000-C1FF MainShadowOAM
7E:C200-C21F SecondaryShadowOAM
7F:0000-0FFF VRAMBuffer0
7F:1000-1FFF VRAMBuffer1
7F:2000-2FFF VRAMBuffer2
7F:3000-3FFF VRAMBuffer3
7F:4000-4FFF VRAMBuffer4
7F:5000-5FFF VRAMBuffer5
7F:C000-C7FF OAM2TileBuf0
7F:C800-CFFF OAM2TileBuf1
7F:D000-D7FF OAM2TileBuf2
7F:D800-DFFF OAM2TileBuf3
7F:E000-E7FF OAM2TileBuf4
7F:E800-EFFF OAM2TileBuf5
7F:F000-F7FF OAM2TileBuf6
7F:F800-FFFF OAM2TileBuf7

Things of interest:

Unsurprisingly, the SGB runs in Mode 1. BG1 is used for the menus and custom drawings, BG2 for the border, and BG3 for the GB screen.

File comment: Source code + binary of the SGB ROM I used. Entry point in src/home/header.asm, SNES program (inexplicably cut off) in src/res/sgb/ [73.13 KiB]
Downloaded 78 times

The French Lord of Laziness (and a huge Legend of Zelda fan)
ASMu is laifu <3
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours

Who is online

Users browsing this forum: No registered users and 7 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group