Re: A82: Re: Re: Assembly-82 Digest V1 #702
[Prev][Next][Index][Thread]
Re: A82: Re: Re: Assembly-82 Digest V1 #702
>Boulderdash uses the memory before GRAPH_MEM for temporary storage during
>the game. This area contains the dTbl value and other information like
>that.
>The value you mention is in the middkle of the area used by boulder dash so
>it is likely that other values are altered too.
>
>I had a look at the boulderdash source code, but could find any problems.
>The area which is modified is backed up before it is altered and restored
>before you exit the game. Since you have to start playing for the problem
>to
>occur, there has to be a line of code in the game which modifes the last
>half of TEXT_MEM.
>
>Dines
Actually the problem was so blatantly obvious that I feel I should
probably smack myself. Here's an ASM intelligence test:
BD startup code:
ld de,GRAPH_MEM-192 ;Address of memory to restore
ld hl,TEXT_MEM2 ;Address of save buffer
ld bc,128 ;Number of bytes to copy
ldir
ld de,GRAPH_MEM-64 ;Address of memory to restore
ld hl,TEXT_MEM+64 ;Address of save buffer
ld bc,64 ;Number of bytes to copy
ldir
ld (iy+13),0 ;No scrolling Text
res 1,(iy+$0D)
...
Hehe. Oops :)
In case you didn't catch it, my hl and de registers are switched causing
the data in TEXT_MEM2 and TEXT_MEM to be copied to GRAPH_MEM-192, not the
other way around. So the TIOS data was not actually getting backed up.
At least it's easy to fix :)
Sam
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Follow-Ups: