Z80 port tracing

If you are having problems finding or using cheats for an Emulator (particularly MAME/MESS) or have found a trick that you wish to share this is the place to do it. But please read the Cheat FAQ first.
Post Reply
Posts: 5
Joined: Sun Feb 28, 2016 5:24 pm

Z80 port tracing

Post by scott_tunstall » Thu Jun 08, 2017 12:44 pm

Am working on Gorf at the moment.

I was wondering, is it possible in MAME to put a watch on a Z80 I/O port?

For example, ports that read # of credits inserted, switches etc with the IN A, (C) instruction and OUT (C), A? etc.

With memory mapped IO I can use WPSET, but I don't know what I can use for ports.

Any advice appreciated.


Posts: 18
Joined: Sat Apr 30, 2016 4:49 pm

Re: Z80 port tracing

Post by crazyc » Fri Jun 09, 2017 1:54 pm

"wpi" debugger command.

User avatar
Posts: 3201
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.

Re: Z80 port tracing

Post by Pugsy » Wed Jun 14, 2017 10:40 pm

Not used wpi myself, but I guess it depends on what you are trying to do exactly I guess.

For Gorf, the credit pulse happens when D009=1 and it does D003++ and then sets D009=0.

Servicing your cheating needs since 1985 ;-)

Grab the latest cheat collection:
MAME 0.200 XML cheat collection 12 AUGUST 2018) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/39od7hvga ... at0200.zip (ZIP Archive 1894 KB)

Post Reply