A86: Re: saving high scores


[Prev][Next][Index][Thread]

A86: Re: saving high scores




You need to use writeback (yes, I am going to update the FAQ...).  Oh, this
assumes that the data to be saved is on ram page 7 (meaning you didn't copy
your program from a string to ram page 1 or something):

SaveGame:
 ld hl,ProgramVar-1
 rst 20h
 rst 10h
 call _ex_ahl_bde
 ld de,GameSaveData-_asm_exec_ram+4
 add hl,de
 adc a,0
 call _set_abs_dest_addr
 sub a
 ld hl,GameSaveData
 call _set_abs_src_addr
 ld hl,GameSaveDataSize
 call _set_mm_num_bytes
 call _mm_ldir
 ret

ProgramVar:
 6,"mygame"

GameSaveData:
highscore:
 .db 0
GameSaveDataSize =$-GameSaveData

>
> is there a good high score routine out there.
>
> i need to save a byte from
> score = _textShadow
>
> to
>
> highscore:
> .db 0
> i cant get anything to work
>
>



References: