Page 2 of 2

Posted: Thu Feb 12, 2009 5:31 pm
by Darendor
Any clue on the C64 version as to how specials are stored/executed?

Posted: Thu Feb 12, 2009 6:50 pm
by Horpner
I've been hoping some sort of inspiration would strike, but so far nothing.

It's the next thing for my map-drawing program, though, so further reverse engineering is coming soon.

Posted: Thu Feb 12, 2009 7:07 pm
by Darendor
Horpner wrote:I've been hoping some sort of inspiration would strike, but so far nothing.

It's the next thing for my map-drawing program, though, so further reverse engineering is coming soon.
Well how did you find the physical layout and trap layout code so easily?

Posted: Thu Feb 12, 2009 7:26 pm
by Horpner
Finding the map layout was actually a huge pain in the ass; deciphering it turned out to be kind of easy, though--once I knew the general area to look at.

For the curious, this is the procedure I used:

I made multiple memory dumps from Vice from within different dungeon levels, and while my party was on different tiles.

Then I used a 'diff' tool, a program that compares two files and shows the differences between them. WinMerge turned out be a an excellent tool for this work.

First, I compared two memory dumps from different tiles on the same dungeon level. I kept a list of those differences as DiffA. Then, I compared one of those dumps to a dump from a different dungeon level. I called these differences DiffB.

Then I basically subtracted DiffA from DiffB, so that hopefully the differences remaining would be only the memory locations that contained dungeon data.

As prep for the above work, I studied the C64's memory map, so I avoid looking at memory that just had to do with the display on the screen.

When I found the string of bytes 44 15 05 05 05 05 05 05 05 at f800 I knew I was pretty sure I had struck gold. Also, many of my assumptions about how the map must be stored turned out to be true--that was a combination luck and some experience programming.

Posted: Fri Feb 13, 2009 2:36 am
by Darendor
...

Again, I feel stupified by your genius.

Anyhow, so, which bit indicates a "special" again? I think we'd need to look there as a pointer.
Horpner wrote:Finding the map layout was actually a huge pain in the ass; deciphering it turned out to be kind of easy, though--once I knew the general area to look at.

For the curious, this is the procedure I used:

I made multiple memory dumps from Vice from within different dungeon levels, and while my party was on different tiles.

Then I used a 'diff' tool, a program that compares two files and shows the differences between them. WinMerge turned out be a an excellent tool for this work.

First, I compared two memory dumps from different tiles on the same dungeon level. I kept a list of those differences as DiffA. Then, I compared one of those dumps to a dump from a different dungeon level. I called these differences DiffB.

Then I basically subtracted DiffA from DiffB, so that hopefully the differences remaining would be only the memory locations that contained dungeon data.

As prep for the above work, I studied the C64's memory map, so I avoid looking at memory that just had to do with the display on the screen.

When I found the string of bytes 44 15 05 05 05 05 05 05 05 at f800 I knew I was pretty sure I had struck gold. Also, many of my assumptions about how the map must be stored turned out to be true--that was a combination luck and some experience programming.