mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
74259: More descriptive names for nibble write handlers (nw)
This commit is contained in:
parent
77b309ab7e
commit
4ed74a8b4f
@ -313,23 +313,23 @@ WRITE8_MEMBER(addressable_latch_device::write_a3)
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// write_nibble - write handler using LSB of
|
||||
// write_nibble_d0 - write handler using LSB of
|
||||
// data as input and next three bits as address
|
||||
// (offset is ignored)
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(addressable_latch_device::write_nibble)
|
||||
WRITE8_MEMBER(addressable_latch_device::write_nibble_d0)
|
||||
{
|
||||
write_bit((data & 0x0e) >> 1, data & 0x01);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// write_nibble_alt - write handler using bit 3 of
|
||||
// write_nibble_d3 - write handler using bit 3 of
|
||||
// data as input and lowest three bits as address
|
||||
// (offset is ignored)
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER(addressable_latch_device::write_nibble_alt)
|
||||
WRITE8_MEMBER(addressable_latch_device::write_nibble_d3)
|
||||
{
|
||||
write_bit(data & 0x07, BIT(data, 3));
|
||||
}
|
||||
|
@ -77,8 +77,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(write_d7);
|
||||
DECLARE_WRITE8_MEMBER(write_a0);
|
||||
DECLARE_WRITE8_MEMBER(write_a3);
|
||||
DECLARE_WRITE8_MEMBER(write_nibble);
|
||||
DECLARE_WRITE8_MEMBER(write_nibble_alt);
|
||||
DECLARE_WRITE8_MEMBER(write_nibble_d0);
|
||||
DECLARE_WRITE8_MEMBER(write_nibble_d3);
|
||||
DECLARE_WRITE8_MEMBER(clear);
|
||||
|
||||
// read handlers (inlined for the sake of optimization)
|
||||
|
@ -335,14 +335,14 @@ static ADDRESS_MAP_START( bigbord2_io, AS_IO, 8, bigbord2_state )
|
||||
AM_RANGE(0x84, 0x87) AM_DEVREADWRITE("ctc1", z80ctc_device, read, write) // u37 has issues
|
||||
AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE("ctc2", z80ctc_device, read, write) // u21
|
||||
AM_RANGE(0x8c, 0x8f) AM_DEVREADWRITE("dma", z80dma_device, read, write) // u62
|
||||
AM_RANGE(0xc0, 0xc3) AM_DEVWRITE("proglatch", ls259_device, write_nibble_alt) // u41 - eprom programming port
|
||||
AM_RANGE(0xc0, 0xc3) AM_DEVWRITE("proglatch", ls259_device, write_nibble_d3) // u41 - eprom programming port
|
||||
AM_RANGE(0xc4, 0xc7) AM_READ(status_port_r) // u11
|
||||
AM_RANGE(0xc8, 0xcb) AM_DEVWRITE("syslatch1", ls259_device, write_nibble_alt) // u14
|
||||
AM_RANGE(0xc8, 0xcb) AM_DEVWRITE("syslatch1", ls259_device, write_nibble_d3) // u14
|
||||
AM_RANGE(0xcc, 0xcf) AM_WRITE(syslatch2_w)
|
||||
AM_RANGE(0xd0, 0xd3) AM_READ(kbd_r) // u1
|
||||
AM_RANGE(0xd4, 0xd7) AM_DEVREADWRITE("fdc", mb8877_device, read, write) // u10
|
||||
//AM_RANGE(0xd8, 0xdb) AM_READWRITE(portd8_r, portd8_w) // various external data ports; DB = centronics printer
|
||||
AM_RANGE(0xd9, 0xd9) AM_DEVWRITE("outlatch1", ls259_device, write_nibble_alt) // u96
|
||||
AM_RANGE(0xd9, 0xd9) AM_DEVWRITE("outlatch1", ls259_device, write_nibble_d3) // u96
|
||||
AM_RANGE(0xdc, 0xdc) AM_MIRROR(2) AM_DEVREADWRITE("crtc", mc6845_device, status_r, address_w) // u30
|
||||
AM_RANGE(0xdd, 0xdd) AM_MIRROR(2) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w)
|
||||
ADDRESS_MAP_END
|
||||
|
@ -327,8 +327,8 @@ static ADDRESS_MAP_START( mjsister_io_map, AS_IO, 8, mjsister_state )
|
||||
AM_RANGE(0x12, 0x12) AM_DEVWRITE("aysnd", ay8910_device, data_w)
|
||||
AM_RANGE(0x20, 0x20) AM_READ(keys_r)
|
||||
AM_RANGE(0x21, 0x21) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0x30, 0x30) AM_DEVWRITE("mainlatch1", ls259_device, write_nibble)
|
||||
AM_RANGE(0x31, 0x31) AM_DEVWRITE("mainlatch2", ls259_device, write_nibble)
|
||||
AM_RANGE(0x30, 0x30) AM_DEVWRITE("mainlatch1", ls259_device, write_nibble_d0)
|
||||
AM_RANGE(0x31, 0x31) AM_DEVWRITE("mainlatch2", ls259_device, write_nibble_d0)
|
||||
AM_RANGE(0x32, 0x32) AM_WRITE(input_sel1_w)
|
||||
AM_RANGE(0x33, 0x33) AM_WRITE(input_sel2_w)
|
||||
AM_RANGE(0x34, 0x34) AM_WRITE(dac_adr_s_w)
|
||||
|
@ -843,7 +843,7 @@ static ADDRESS_MAP_START( rallybik_sound_io_map, AS_IO, 8, toaplan1_rallybik_sta
|
||||
AM_RANGE(0x00, 0x00) AM_READ_PORT("P1")
|
||||
AM_RANGE(0x10, 0x10) AM_READ_PORT("P2")
|
||||
AM_RANGE(0x20, 0x20) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x30, 0x30) AM_DEVWRITE("coinlatch", ls259_device, write_nibble) /* Coin counter/lockout */
|
||||
AM_RANGE(0x30, 0x30) AM_DEVWRITE("coinlatch", ls259_device, write_nibble_d0) /* Coin counter/lockout */
|
||||
AM_RANGE(0x40, 0x40) AM_READ_PORT("DSWA")
|
||||
AM_RANGE(0x50, 0x50) AM_READ_PORT("DSWB")
|
||||
AM_RANGE(0x60, 0x61) AM_DEVREADWRITE("ymsnd", ym3812_device, read, write)
|
||||
|
Loading…
Reference in New Issue
Block a user