[mdndclab] Show walls

This forum is for posting cheats for any non-arcade game in M.A.M.E. ( aka the M.E.S.S. games ) including any softwarelist game. Requests will be fulfilled here....but please keep the requests to the requests forum.
Post Reply
crazyc
Posts: 17
Joined: Sat Apr 30, 2016 4:49 pm

[mdndclab] Show walls

Post by crazyc » Sun May 01, 2016 3:22 pm

This is for the Dungeons and Dragons Computer Labyrinth game and might be the first cheat in the new effort to emulate LCD handhelds and other electronic games. It shows the walls which the player would find by the sound it made and place manually. This cheat will only work with the lua cheat engine and current git or the next release (0.174) as the game is in 0.173 but it uses features added after release. Also, note you have to start a game before it'll work as the wall positions are generated then.

Code: Select all

[{
	"desc": "Show all walls",
	"space": {
		"cpu": {
			"tag": ":maincpu",
			"type": "data"
		}
	},
	"script": {
		"on": "for i = 0, 31 do local off = ((i > 16) and (i - 16 + 0x40)) or i local val = cpu:read_u8(off) local walllo, wallhi = (i << 1) & 7, (i >> 2) & 7 outputs:set_indexed_value(\"colwall\", wallhi * 10 + walllo + 11, ((val & 1) ~= 0) and 1 or 0) outputs:set_indexed_value(\"colwall\", wallhi * 10 + walllo + 12, ((val & 4) ~= 0) and 1 or 0) outputs:set_indexed_value(\"rowwall\", walllo * 10 + wallhi + 11, ((val & 2) ~= 0) and 1 or 0) outputs:set_indexed_value(\"rowwall\", (walllo + 1) * 10 + wallhi + 11, ((val & 8) ~= 0) and 1 or 0) end"
	}
}]

Post Reply