hacker65xx
Posts: 5
Joined: Tue Oct 20, 2020 7:47 pm

Question about to edit a driver

Hi,

I would like to know if I can modify a driver to change .port addresses, to read & write addresses ??

by example line: map(0xX, 0xX).portr(XXX);
become: map(0xX, 0xX).rw(XXX);

It's possible ??

Thank you
hacker65xx
Posts: 5
Joined: Tue Oct 20, 2020 7:47 pm

Re: Question about to edit a driver

Can i modify .portr by .rw or .portr.rw or .portrw ??
Robert
Posts: 99
Joined: Thu Nov 06, 2014 12:44 pm

Re: Question about to edit a driver

(deleted)
Last edited by Robert on Fri Sep 23, 2022 2:37 am, edited 1 time in total.
hacker65xx
Posts: 5
Joined: Tue Oct 20, 2020 7:47 pm

Re: Question about to edit a driver

Robert wrote: Fri Oct 23, 2020 11:17 pm No such thing as rw. You have to split it up.

.r(blah).w(foo);
Hi , thank you Robert

In PGM driver:
https://github.com/mamedev/mame/blob/ma ... rs/pgm.cpp
there is:
line 339: map(0xc08000, 0xc08001).portr("P1P2");
line 340: map(0xc08002, 0xc08003).portr("P3P4");

If I change the 2 lines there, is that enough to be able to write to $c08000 / $c08004 ??

By example for line 339 it's
map(0xc08000, 0xc08001).rw("P1P2"); ??
or
map(0xc08000, 0xc08001).portr("P1P2").w; ??
or
others ?? I didn't all understand for the split :?

Return to “MAME Discussion”