So, oddly with a system as big as Gameboy Color is, I can't seem to find any good documents about it. Everything I find is about the original Gameboy with some minor mentions of Color GameBoy, but absolutely no details on GameBoy Color additions like DMA, Extra VRAM, Toggling CPU Speed, etc.
Does anyone know where to get good and complete GBC information? It seems GB and GBC documentation can't compare to the NES documents that are available.
IIRC, there wasn't much added for the GBC upgrade. Heh - but it's been a long time since I've touched GB/C dev. CPU speed, another bank of vram, an additional DMA mode or something. That's all I can remember. Anyway...
The GBColor cribsheet should give you the memory mapped registers you're looking for -
http://pcedev.net/gbc/GBCribSheet000129.pdf . (Some GBC stuff on page 3)
Here's the original GB cribsheet in case... dunno.. here -
http://pcedev.net/gbc/GBCribSheet.pdf .
The GBC may not have added "much" but if it had a damned backlight it would have been quite a worthy improvement. More VRAM for more tiles, color, 2x CPU speed, DMA to VRAM. Not too shabby in my opinion.
I'd swear I'd seen that cribsheet before and it didn't have any of the register listings like the one you linked me here. I think I have the information I need now.
I think this is a good source of info for GBC:
http://nocash.emubase.de/pandocs.htm
That's pretty much the only one I've ever seen. Recently I had the same issue looking for GBC docs.
I updated a copy of that to include more complete SGB information at GSHI. A consequence of using the document to rip SGB game SPC files.
Thanks Celius for the link. That's much more informations than the previous "Pandocs" I'd seen. I get the feeling only versions of information is all about.
Yeah, no problem. I actually can't recall how I found that info. I think it was by luck. It's sad that there's so little info and basically not even ruins or fossils left by a GBCdev community. I don't even know if one existed. Well at least there's this little documentation, which is pretty much all you need to know (though there are probably hardware quirks that aren't documented, but oh well, I guess).
Well I think we are somewhat spoiled by how well documented the NES is now. It would be nice if GBC reached that level someday, same with SNES.
I think I have most of the information I need to get started, I can feel my way through the blurry parts.
I dabbled in b&w gameboy for a bit - made a calculator that has a working user interface and can convert BCD into a 40-bit number but is still non-functional. That was done in asm but I wanted to make an 8-way scrolling map using C. Then I noticed the compiler doesn't do 16-bit math so the heck with it.
I still have lots of downloaded material/docs/etc from when the GBC dev scene was booming. There's *tons* of redundant info though. Everything you probably need to know is at the no$cash link.
It's too bad the PCE wasn't a little faster. I'd try to emulate the original GB
Who knows, I still might try it out for a game or two. After all - not all games use 100% cpu resource.
Game Boy has 8 KB of work RAM. Wikipedia says PCE has 8 KB of work RAM. Where would you put the state of the emulated machine? Would you try to shoehorn it into VRAM, given that it's dual ported?
One of the PCE ROM types has an additional 32k of ram. I'd use that configuration or put it into a CDROM project where it's all ram. The PCE has plenty of open bus areas in the upper 2meg range where I can easily map in some extra ram, but I doubt I can convince any PCE emulator authors to support it even if I have it setup and working on my rom board
But now I'm getting off topic..
There's tons of poorly documented obscure facts about the GBC, like how scanline 0 starts much eariler than you'd think it would, but if you tried to emulate it such that all scanlines took equal time, you'd end up with scrolling artifacts near the top of the screen in many games.
That's what I'm doing though, trying to emulate it. However right now the issue is probably cpu core development and emulating registers to get games to run. Right now I got Dr. Mario partially running. But it's not running correctly yet. It'll be awhile till I figure out what the deal is with it. I seem to remember someone saying that GB was easier than the NES but I seriously think they are wrong. The NES was not near as difficult for me to start emulating. I've only been at the GB for a few days but I honestly didn't think I'd have this much trouble getting simple games working.
Is it GBZ80 bugs that are stopping the games from running?
I don't know yet. I've got to look through the CPU execution log to see what it is doing and try to determine what is not behaving as it should. That takes a long time.
I'm not really sure the CPU core is at fault in most cases, as it could be GB related registers not behaving the way the game wants, or possibly waiting for the couple interrupts I have not yet implemented.
I do know that Dr. Mario uses the Timer interrupt for sound updates and if you disable it, you get no music or sound. Dr. Mario is the game that works "best" for me right now. But basically it gets into the game and you can see one virus in the bottom right of the jar. I wait and wait and pills never appear at the bottom. I'm not sure why that is, but CPU core bugs I imagine are the problem there. But basically I've gotta go through huge logs or reexamine each opcode for potential errors.
I suppose I was a bit spoiled with the NES CPU Test rom which helped me debug the core on my NES emu.
It might help to take a lot at mednafen's source? I still have my flash card for GB/C and can dig it out if you need some testing done (you write the code ofcourse - I've got a lot I'm still working on
)
Well I've been progressing today. Tetris and Asteroids are doing some stuff though it's hard to tell with Asteroids since it heavily uses sprites. But surprisingly Super Mario Land is looking the best so far as it runs through all 3 different demos of levels with no problems and keep going and going.
So I added some support for MBC-1 bank switching so I could run SML and test out some others. Where exactly can you find Mednafen's source? If the CPU core is readable then I might find that useful to see if I have any opcodes that are not working like they should because I didn't understand them or anything like that. I am finding some of those bugs out by testing various games and figuring out why they lock up or behave wrong.
One strange behavior I haven't looked into yet is in Tetris, the blocks are always the 2x2 square. I have a feeling though that it uses that Timer as a seed for randomization.
I also thought that Alleyway would be really easy to get working but it expects the serial transfer interrupt to get triggered and if it doesn't the game doesn't really cooperate at all.
Right now I'm mainly interested in Tetris, Asteroids, and Super Mario Land as they seem to do the most interesting things.
http://mednafen.sourceforge.net/releases/ - Right under change log is the link to the sources/builds. It's modified VBA source I believe.