Page 1 of 1

Question about to edit a driver

Posted: Wed Oct 21, 2020 7:27 pm
by hacker65xx
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

Re: Question about to edit a driver

Posted: Fri Oct 23, 2020 2:57 pm
by hacker65xx
Can i modify .portr by .rw or .portr.rw or .portrw ??

Re: Question about to edit a driver

Posted: Fri Oct 23, 2020 11:17 pm
by Robert
(deleted)

Re: Question about to edit a driver

Posted: Sun Oct 25, 2020 3:50 am
by hacker65xx
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 :?