问题描述
我有一个.dat文件(我相信)在advmame
中将高分存储在一个名为hiscore.dat
的文件中。
据我了解,可能是错误的,.dat文件存储游戏名称和该游戏高分的内存地址:
foogame: ;******foo game
0:6105:9e:10:10
0:7661:1:10:10
0:7641:1:00:00
0:7621:1:00:00
0:7601:1:07:07
0:75e1:1:06:06
0:75c1:1:05:05
0:75a1:1:00:00
在python中,有没有办法读取存储在这些内存位置的值?
已编辑-按照文件顶部的说明进行操作:
;This file should be in the same directory of MAME.EXE .
;
;This file can be edited with a text editor, but keep the same format:
; all fields are separated by a colon (:)
; <gamename>:
; <cpu>:<address>:<length>:<value to wait for
; in the first byte/word>:<value to wait for in the last byte/word>
; [repeat the above as many times as necessary]
有关hiscore.dat的一些附加信息:
A hiscore.dat file is needed so your modified version of MAME will read to know which memory addresses contain the high scores for supported games.
1楼
MAME是用于街机游戏系统中各种计算机的仿真器。 该文件中引用的“内存地址”是进入模拟计算机的内存的地址,而不是您自己系统的内存的地址。 尽管可以在运行游戏时使用操作系统的调试钩子窥探MAME的内存,并在其中找到仿真系统的内存(然后在仿真内存中查找游戏的高分),但我怀疑它麻烦将多于其价值。
的确,在您提供的“信息”链接之后,建议highscores.dat
的全部要点是告诉MAME如何在运行的游戏中找到高分,以便为您保存高分(我认为是另存为其他文件) 。
链接是关于作者应用进行保存的经验。