It is currently Fri Sep 20, 2019 3:17 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: FPGA GBA cart
PostPosted: Tue Feb 05, 2019 3:22 am 
Offline
User avatar

Joined: Sun Nov 25, 2012 5:28 am
Posts: 27
Location: Adelaide, Australia
I'm attempting an FPGA implementation for a basic GBA cart - have gotten as far as the Nintendo logo almost working but becoming garbled towards the end... does this look indicative of something in particular?

Attachment:
IMG_20190205_1824026.jpg
IMG_20190205_1824026.jpg [ 2.79 MiB | Viewed 4262 times ]


Wondering if it may have something to do with this (from http://problemkaputt.de/gbatek.htm#gbacartridges):

Quote:
"09Eh Bit 0,1 - Cartridge Key Number MSBs
This is part of the above Nintendo Logo area, and must be commonly set to F8h, however, Bit 0-1 may be set to other values.
During startup, the BIOS performs some dummy-reads from a stream of pre-defined addresses, even though these reads seem to be meaningless, they might be intended to unlock a read-protection inside of commercial cartridge. There are 16 pre-defined address streams - selected by a 4bit key number - of which the upper two bits are gained from 800009Eh Bit 0-1, and the lower two bits from a checksum across header bytes 09Dh..0B7h (bytewise XORed, divided by 40h)."


What are these pre-defined addresses? and what data is expected in return?

Thanks for any insights! :)


Top
 Profile  
 
 Post subject: Re: FPGA GBA cart
PostPosted: Wed Feb 06, 2019 6:27 am 
Offline
User avatar

Joined: Sun Nov 25, 2012 5:28 am
Posts: 27
Location: Adelaide, Australia
OK... managed to progress past this - the Nintendo® logo appears fine (just needed to tweak the code to ignore RD when CS is not low - hadn't even occurred to me RD would toggle regardless of CS!), next problem is, logo fades away to a white screen, and then nothing.

Some Google searches mentioned something about Flash memory settings causing a white screen like this in emulators - is the GBA looking for some response from Flash before it will continue? are there some registers I can set to remedy this? :?


Top
 Profile  
 
 Post subject: Re: FPGA GBA cart
PostPosted: Wed Feb 06, 2019 7:58 pm 
Offline
User avatar

Joined: Sun Nov 25, 2012 5:28 am
Posts: 27
Location: Adelaide, Australia
Still poking around in the dark on this... have tried coming at it from a few different angles, but there is something happening at the point the logo fades away and the game should start that I am missing?! Need something I can step through that outlines the sequence of events at startup? :cry:


Top
 Profile  
 
 Post subject: Re: FPGA GBA cart
PostPosted: Sun Feb 10, 2019 4:12 am 
Offline
User avatar

Joined: Sun Nov 25, 2012 5:28 am
Posts: 27
Location: Adelaide, Australia
After several painful days I have thoroughly learned a valuable lesson: "Don't do asynchronous edge detection, ever. Remember: Keep It Synchronous, Stupid." (from https://www.doulos.com/knowhow/fpga/synchronisation/)

Here is the latest verilog - would be eternally grateful for any optimisations that could be found? (there's still a lot I want to add in, but seems like it is right at the breaking point with just what is there now)

https://github.com/uXeBoy/GBA

https://www.youtube.com/watch?v=IXGc9o0PByI


Top
 Profile  
 
 Post subject: Re: FPGA GBA cart
PostPosted: Mon Feb 11, 2019 10:47 am 
Offline
User avatar

Joined: Wed Dec 01, 2010 9:43 pm
Posts: 7
There's an FPGA GBA core that doesn't quite work yet but maybe there's enough there to give you some ideas?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 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