Thanks to a morning working from home because I was waiting for an old mattress to be taken away, I was able to swing by GAME store on the way to work after they sent me a text message letting me know Pokemon Y was ready to collect.
I was unsure at first whether it was worth a detour since they could have just sent it by mistake, but it worked in my favour, they were selling it a day early. Giving me plenty of time sure the lunch hour to catch as many as I could in the starting areas.
So I decided without falling back on buying a new Gameboy, I’ll make one.
Having written an operating system in assembly before, and my playing around with microcontrollers, the concept is simple.
All I required was some informations on the clock timings, and when the vertical sync happens.
There is plenty of documentation on the GB, my favourite of which is the Gameboy CPU Manual since it had a breakdown of the opcodes and registers as well as memory addresses.
After setting up a large switch statement to handle the opcodes, I began by running Pokemon Red, which gave me the initial NINTENDO logo before getting stuck in a loop. After a bit of debugging, it turned out one of my opcodes was functioning wrong (I should have wrote a unit test for all of them).
Using GLUT I was able to read the part of memory where the LCD output gets drawn to and render it.
After some tweaking around with sprites, I finally got the Pokemon to show on the title image. I have yet to setup input so I cannot progress beyond this screen.
I’m starting to wonder if I can make an attachment to my iPhone for the cartridge to plug into so I can play it and other games.
I managed to goto the Island of Dreams 5 times before the Pokemon and items stopped appearing. I only played one minigame for one Pokemon so I didn’t get many dream points today.
Tomorrow I will not bother picking up the items, see if that changes how many visits. To be honest, I don’t want another Oran berry.
Heres what berries I have so far from my scouting and trading of other players.