Thursday, March 31, 2011

Seeking causes crash on AVR (bug in my code)

So yesterday when I started a game of Dragon's Lair, the AVR would crash. I wasn't sure what was causing it but today I simulated the same command sequence using the PC's parallel port (to eliminate the Dragon's Lair as being the problem) and it crashed again. Here's the log:


Starting Main Game Loop
Play
LDP : Received pause while disc was not playing, ignoring
listener: Controller is using our current settings (yay!)
listener: VLDP-HW: <- fd
listener: VLDP-HW: Play
listener: VLDP-HW: -> 64
listener: VLDP-HW: LDP Status: Spinning up
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> e4
listener: VLDP-HW: LDP Status: Playing
listener: VLDP-HW: <- 3f
listener: VLDP-HW: -> 64
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> e4
listener: VLDP-HW: <- f
listener: VLDP-HW: -> 64
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> e4
listener: VLDP-HW: <- 2f
listener: VLDP-HW: -> 64
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> e4
listener: VLDP-HW: <- 8f
listener: VLDP-HW: -> 64
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> e4
listener: VLDP-HW: <- 2f
listener: VLDP-HW: -> 64
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> e4
listener: VLDP-HW: AM HERE!
listener: VLDP-HW: Settings applied
listener: Controller said hello
listener: VLDP-HW: LDV1000 start
listener: VLDP-HW: <- ff
listener: VLDP-HW: -> fc
listener: VLDP-HW: LDP Status: Stopped
listener: Controller is using our current settings (yay!)


Do you know what this means? It means that this.. DANG THING.. doesn't work at all!

Actually what it means is that I get to step through in the simulator and see why it's crashing. The "AM HERE!" string is the first thing the AVR sends when it boots. I've seen crashes caused by null pointer dereferencing so that is one possibility. I sure hope I can figure out a way to make the simulator run most of this code by itself because entering in the entire command sequence by hand in the debugger would take a long time.

No comments:

Post a Comment