|
Score tracking system in tgm2p (Tetris The Absolute The Grand Master 2 PLUS)
#265622 - 10/04/11 10:48 PM
|
|
|
Hey
I'm trying to hack a score tracking system in tgm2p (basically just dumping the final score and a timestamp to a text file) for fun, and I'm using this Code:
sh2->program->read_byte(0x06064BBB) to read the score on "sh2drc.c" inside the do...while on CPU_EXECUTE.
Is there a better way to this?
Thank you!
Edited by lolpatlol (10/04/11 10:49 PM)
|
|
|
R. Belmont |
Cuckoo for IGAvania
|
|
|
Reged: 09/21/03
|
Posts: 9716
|
Loc: ECV-197 The Orville
|
|
Send PM
|
|
|
Re: Score tracking system in tgm2p (Tetris The Absolute The Grand Master 2 PLUS)
[Re: patreezus]
#265714 - 10/05/11 10:39 PM
|
|
|
> Hey > > I'm trying to hack a score tracking system in tgm2p (basically just dumping the final > score and a timestamp to a text file) for fun, and I'm using this > sh2->program->read_byte(0x06064BBB) to read the score on "sh2drc.c" inside the > do...while on CPU_EXECUTE. > > Is there a better way to this?
Assuming you only want to read that score at the end of the game, adding a MACHINE_STOP handler to the driver and doing the read there would be a much, much better idea. Or just run -debug, hit tilde when it's time to pull up the score, and save the relevant memory bytes to a file ("help memory" will tell you how to do that).
|
|
|
|
Re: Score tracking system in tgm2p (Tetris The Absolute The Grand Master 2 PLUS)
[Re: R. Belmont]
#265724 - 10/05/11 11:31 PM
|
|
|
I want the process to be as automatic as possible (I then treat the data with a Java program, C++ is not my strong), and at the end of every game, not the last game. Wouldn't MACHINE_STOP only work when the game, well, stops?
I was asking more in terms of another place where to put the code, since I don't think that in the processor core is the right place...
|
|
|