summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/taito.cpp
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2022-03-23 10:16:49 -0800
committer GitHub <noreply@github.com>2022-03-23 14:16:49 -0400
commit00dedfabc90465b6183e6fee4287d3d494921aa6 (patch)
tree90a5ea2a10251901f757cefd197cae3f0c0a07ab /src/devices/bus/nes/taito.cpp
parentd31fe10f921b6887e5596edc786803fa3a81c57d (diff)
bus/nes: Simplifications using bit utility functions. (#9444)
* bus/nes: Simplifications using bit utility functions. * Corrected UNL-KOF97 board's address decoding. * Cleaned up Gouder board further and added missing mirroring bit. Fixes BG graphics.
Diffstat (limited to 'src/devices/bus/nes/taito.cpp')
-rw-r--r--src/devices/bus/nes/taito.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/bus/nes/taito.cpp b/src/devices/bus/nes/taito.cpp
index 28c37b6109c..8c806672a7d 100644
--- a/src/devices/bus/nes/taito.cpp
+++ b/src/devices/bus/nes/taito.cpp
@@ -298,19 +298,19 @@ void nes_x1_005_device::write_m(offs_t offset, uint8_t data)
switch (offset)
{
case 0x1ef0:
- chr2_0((data & 0x7f) >> 1, CHRROM);
+ chr2_0(BIT(data, 1, 6), CHRROM);
if (m_x1_005_alt_mirroring)
{
- set_nt_page(0, CIRAM, (data & 0x80) ? 1 : 0, 1);
- set_nt_page(1, CIRAM, (data & 0x80) ? 1 : 0, 1);
+ set_nt_page(0, CIRAM, BIT(data, 7), 1);
+ set_nt_page(1, CIRAM, BIT(data, 7), 1);
}
break;
case 0x1ef1:
- chr2_2((data & 0x7f) >> 1, CHRROM);
+ chr2_2(BIT(data, 1, 6), CHRROM);
if (m_x1_005_alt_mirroring)
{
- set_nt_page(2, CIRAM, (data & 0x80) ? 1 : 0, 1);
- set_nt_page(3, CIRAM, (data & 0x80) ? 1 : 0, 1);
+ set_nt_page(2, CIRAM, BIT(data, 7), 1);
+ set_nt_page(3, CIRAM, BIT(data, 7), 1);
}
break;
case 0x1ef2: