Documente Academic
Documente Profesional
Documente Cultură
HACKADAY
HOME
BLOG
HACKADAY.IO
STORE
HACKADAY PRIZE
SUBMIT
ABOUT
February 2, 2016
13 Comments
June 18, 2014
SEARCH
Search
SEARCH
IF YOU MISSED IT
[Chris] needed to write a small homebrew Mega Drive app for the ROM
loader portion of his dev kit using SGDK. Disassembling his own code with
the dev kit, he was able to take a look at the instructions, and potentially even
http://hackaday.com/2014/06/18/the-sega-mega-drive-dev-kit/
1/7
2/3/2016
BEAUTIFUL AND
BIZARRE BOARDS
47 Comments
CATEGORIES
Select Category
http://hackaday.com/2014/06/18/the-sega-mega-drive-dev-kit/
2/7
2/3/2016
Any DIY projects like this for NES or SNES (project files, schematics,
code, BoM)?
Reply
Report comment
KayserSoze says:
June 18, 2014 at 10:15 am
3/7
2/3/2016
Report comment
Report comment
Funnily enough I actually wrote / found the infinite life cheat for
sonic 1 for game genie.. It was my first job after I left school at 16. I
was hired by a little games company called Optimus software in
Stockton uk to hack all the genesis and snes games and create the
cheats for it.. I did this on the genesis using a special cartridge that
let my plug the carts into an amiga where I could look though the
rom. Then I had a special genesis where I could alter 2 bytes of
rom , using an address and replacement bytes.
For snes I used a logic analyser. And another special cart.. The
cheats I found were then loaded I to a special program which
would spit out the special game genie codes..
Reply
Report comment
JIm B says:
June 18, 2014 at 10:11 am
4/7
2/3/2016
Report comment
http://krikzz.com/index.php?route=product/product&product_id=55
Reply
Report comment
notdave says:
June 18, 2014 at 2:27 pm
Report comment
Gdogg says:
June 18, 2014 at 1:44 pm
Awesome. Not sure I understand how the debugger can read the
registers, but I guess for breakpoints and such it just overwrites its
vector table which is interesting: That means the vectors are reimplemented on each cartridge (if the cartridge is in their address
space).
Reply
Report comment
prophet3636 says:
June 18, 2014 at 2:14 pm
The debugger can read and write the 68000 registers because the
first thing the monitor[1] does when it starts is to save the registers
to a well-defined region of SDRAM, where they can be read or
written by the host[2]. When the monitor exits, it loads the 68000
state from the same region of SDRAM, thereby picking up any
changes the host made.
Breakpoints are implemented by writing the monitor address to the
illegal instruction vector, then temporarily writing the illegal
instruction opcode to the breakpoint address. When the breakpoint
is hit, the 68000 throws an illegal instruction exception and returns
control to the monitor.
Single-stepping is implemented in the same way, but it uses the
68000s built-in trace mechanism, where a trace exception is
thrown (you guessed it, back to the monitor) after just one
instruction has been executed.
TBH all the debug stuff was made *much* easier by the fact that
my SDRAM controller interleaves MD reads & writes with the
hosts reads & writes, so the only orchestration that is necessary is
the polling (on both sides) of a semaphore at a certain address in
SDRAM.
http://hackaday.com/2014/06/18/the-sega-mega-drive-dev-kit/
5/7
2/3/2016
[1]https://github.com/makestuff/umdkv2/blob/20140524/gdbbridge/monitor/monitor.s#L97
[2]https://github.com/makestuff/umdkv2/blob/20140524/gdbbridge/mem.c#L547
Reply
Report comment
Gdogg says:
June 18, 2014 at 4:10 pm
Report comment
Fernie says:
June 18, 2014 at 3:05 pm
Report comment
stefanpirvu says:
June 19, 2014 at 1:09 am
Report comment
prophet3636 says:
June 19, 2014 at 4:34 am
6/7
2/3/2016
SRAM address-space
[2]http://amtek.wordpress.com/2011/07/20/make-your-own-avr-jtagdebugger/
[3]http://aquaticus.info/jtag
Reply
Report comment
Leave a Reply
Email (required)
Gravatar
Name (required)
Website
POST COMMENT
http://hackaday.com/2014/06/18/the-sega-mega-drive-dev-kit/
7/7