diff options
author | David Haywood <28625134+DavidHaywood@users.noreply.github.com> | 2020-03-20 14:34:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 10:34:42 -0400 |
commit | 74c4c3b275c5258e2b98965654b1a5eee321a34f (patch) | |
tree | 6057057d93b8e90e49f88b8bc2535578c1e72445 /src/devices | |
parent | 1f2d08fc6ee4a8499f1427808d60799aa66d3cd7 (diff) |
Plug & Play work (#6463)
* new NOT WORKING
----
TV Fitness Center (Lexibook) [TeamEurope]
Lexibook Retro TV Game Console - Frozen - 300 Games [TeamEurope]
the TV Fitness you can select games etc. but inputs aren't fully mapped, Frozen is a more enhanced NES VT clone than we support (nw)
* new NOT WORKING
----
Haluatko miljonääriksi? (Finland) [Sean Riddle, Santeri Saarimaa]
surprisingly on entirely different hardware to the otherwise identical from the outside, aside from stickers UK version (nw)
* new WORKING machines
----
Double Players Mini Joystick 80-in-1 (MJ8500, ABL TV Game) [Sean Riddle, David Haywood]
* might as well drop the non-working tag here, issues are minor (nw)
* was a PAL unit (nw)
* minor vt refactoring (nw)
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/video/ppu2c0x_sh6578.cpp | 35 | ||||
-rw-r--r-- | src/devices/video/ppu2c0x_sh6578.h | 4 | ||||
-rw-r--r-- | src/devices/video/ppu2c0x_vt.cpp | 229 | ||||
-rw-r--r-- | src/devices/video/ppu2c0x_vt.h | 5 |
4 files changed, 119 insertions, 154 deletions
diff --git a/src/devices/video/ppu2c0x_sh6578.cpp b/src/devices/video/ppu2c0x_sh6578.cpp index dc8721c31f8..c075f684147 100644 --- a/src/devices/video/ppu2c0x_sh6578.cpp +++ b/src/devices/video/ppu2c0x_sh6578.cpp @@ -272,40 +272,17 @@ void ppu_sh6578_device::draw_sprites(uint8_t* line_priority) } */ -void ppu_sh6578_device::write(offs_t offset, uint8_t data) +void ppu_sh6578_device::write_extended(offs_t offset, uint8_t data) { - if (offset < 0x8) - { - ppu2c0x_device::write(offset, data); - } - else if (offset == 0x8) - { - LOGMASKED(LOG_PPU_EXTRA, "%s: ppu_sh6578_device::write : Color Select & PNT Start Address : %02x\n", machine().describe_context(), data); - m_colsel_pntstart = data; - } - else - { - LOGMASKED(LOG_PPU_EXTRA, "%s: ppu_sh6578_device::write : unhandled offset %02x : %02x\n", machine().describe_context(), offset, data); - } + LOGMASKED(LOG_PPU_EXTRA, "%s: ppu_sh6578_device::write : Color Select & PNT Start Address : %02x\n", machine().describe_context(), data); + m_colsel_pntstart = data; } -uint8_t ppu_sh6578_device::read(offs_t offset) +uint8_t ppu_sh6578_device::read_extended(offs_t offset) { - if (offset < 0x8) - { - return ppu2c0x_device::read(offset); - } - else if (offset == 0x8) - { - LOGMASKED(LOG_PPU_EXTRA, "%s: ppu_sh6578_device::read : Color Select & PNT Start Address\n", machine().describe_context()); - return m_colsel_pntstart; - } - else - { - LOGMASKED(LOG_PPU_EXTRA, "%s: ppu_sh6578_device::read : unhandled offset %02x\n", machine().describe_context(), offset); - return 0x00; - } + LOGMASKED(LOG_PPU_EXTRA, "%s: ppu_sh6578_device::read : Color Select & PNT Start Address\n", machine().describe_context()); + return m_colsel_pntstart; } void ppu_sh6578_device::palette_write(offs_t offset, uint8_t data) diff --git a/src/devices/video/ppu2c0x_sh6578.h b/src/devices/video/ppu2c0x_sh6578.h index c617198c93b..99cbe7f41a2 100644 --- a/src/devices/video/ppu2c0x_sh6578.h +++ b/src/devices/video/ppu2c0x_sh6578.h @@ -18,8 +18,8 @@ public: virtual uint8_t palette_read(offs_t offset) override; virtual void palette_write(offs_t offset, uint8_t data) override; - virtual void write(offs_t offset, uint8_t data) override; - virtual uint8_t read(offs_t offset) override; + virtual void write_extended(offs_t offset, uint8_t data); + virtual uint8_t read_extended(offs_t offset); protected: ppu_sh6578_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/video/ppu2c0x_vt.cpp b/src/devices/video/ppu2c0x_vt.cpp index 2f1e3091326..a701d4076d6 100644 --- a/src/devices/video/ppu2c0x_vt.cpp +++ b/src/devices/video/ppu2c0x_vt.cpp @@ -176,75 +176,67 @@ void ppu_vt03_device::palette_write(offs_t offset, uint8_t data) } } -uint8_t ppu_vt03_device::read(offs_t offset) + +uint8_t ppu_vt03_device::read_extended(offs_t offset) { - if (offset <= 0xf) - { - return ppu2c0x_device::read(offset); - } - else if (offset <= 0x1f) - { - logerror("%s: read from reg %02x\n", machine().describe_context(), offset); + offset += 0x10; + logerror("%s: read from extended PPU reg %02x\n", machine().describe_context(), offset); - switch (offset) - { - case 0x10: - return m_201x_regs[0x0]; + switch (offset) + { + case 0x10: + return m_201x_regs[0x0]; - case 0x11: - return m_201x_regs[0x1]; + case 0x11: + return m_201x_regs[0x1]; - case 0x12: - return m_201x_regs[m_2012_2017_descramble[0]]; + case 0x12: + return m_201x_regs[m_2012_2017_descramble[0]]; - case 0x13: - return m_201x_regs[m_2012_2017_descramble[1]]; + case 0x13: + return m_201x_regs[m_2012_2017_descramble[1]]; - case 0x14: - return m_201x_regs[m_2012_2017_descramble[2]]; + case 0x14: + return m_201x_regs[m_2012_2017_descramble[2]]; - case 0x15: - return m_201x_regs[m_2012_2017_descramble[3]]; + case 0x15: + return m_201x_regs[m_2012_2017_descramble[3]]; - case 0x16: - return m_201x_regs[m_2012_2017_descramble[4]]; + case 0x16: + return m_201x_regs[m_2012_2017_descramble[4]]; - case 0x17: - return m_201x_regs[m_2012_2017_descramble[5]]; + case 0x17: + return m_201x_regs[m_2012_2017_descramble[5]]; - case 0x18: - return m_201x_regs[0x8]; + case 0x18: + return m_201x_regs[0x8]; - case 0x19: - return 0x00; + case 0x19: + return 0x00; - case 0x1a: - return m_201x_regs[0xa]; + case 0x1a: + return m_201x_regs[0xa]; - case 0x1b: - return 0x00; + case 0x1b: + return 0x00; - case 0x1c: - return 0x00; + case 0x1c: + return 0x00; - case 0x1d: - return 0x00; + case 0x1d: + return 0x00; - case 0x1e: - return 0x00; + case 0x1e: + return 0x00; - case 0x1f: - return 0x00; - } - } - else - { + case 0x1f: return 0x00; } return 0x00; } + void ppu_vt03_device::init_palette() { // todo, work out the format of the 12 palette bits instead of just calling the main init @@ -500,83 +492,78 @@ void ppu_vt03_device::set_2010_reg(uint8_t data) m_201x_regs[0x0] = data; } -void ppu_vt03_device::write(offs_t offset, uint8_t data) +void ppu_vt03_device::write_extended(offs_t offset, uint8_t data) { - if (offset < 0x10) + offset += 0x10; + logerror("%s: write to extended PPU reg 0x20%02x %02x\n", machine().describe_context(), offset, data); + switch (offset) { - ppu2c0x_device::write(offset, data); - } - else - { - logerror("%s: write to reg 0x20%02x %02x\n", machine().describe_context(), offset, data); - switch (offset) - { - case 0x10: - set_2010_reg(data); - break; - - case 0x11: - m_201x_regs[0x1] = data; - break; - - case 0x12: - m_201x_regs[m_2012_2017_descramble[0]] = data; - break; - - case 0x13: - m_201x_regs[m_2012_2017_descramble[1]] = data; - break; - - case 0x14: - m_201x_regs[m_2012_2017_descramble[2]] = data; - break; - - case 0x15: - m_201x_regs[m_2012_2017_descramble[3]] = data; - break; - - case 0x16: - m_201x_regs[m_2012_2017_descramble[4]] = data; - break; - - case 0x17: - logerror("set reg 7 %02x\n", data); - m_201x_regs[m_2012_2017_descramble[5]] = data; - break; - - case 0x18: - logerror("set reg 8 %02x\n", data); - m_201x_regs[0x8] = data; - break; - - case 0x19: - // reset gun port (value doesn't matter) - break; - - case 0x1a: - m_201x_regs[0xa] = data; - break; - - case 0x1b: - // unused - break; - - case 0x1c: - // (READ) x-coordinate of gun - break; - - case 0x1d: - // (READ) y-coordinate of gun - break; - - case 0x1e: - // (READ) x-coordinate of gun 2 - break; - - case 0x1f: - // (READ) y-coordinate of gun 2 - break; - } + case 0x10: + set_2010_reg(data); + break; + + case 0x11: + m_201x_regs[0x1] = data; + break; + + case 0x12: + m_201x_regs[m_2012_2017_descramble[0]] = data; + break; + + case 0x13: + m_201x_regs[m_2012_2017_descramble[1]] = data; + break; + + case 0x14: + m_201x_regs[m_2012_2017_descramble[2]] = data; + break; + + case 0x15: + m_201x_regs[m_2012_2017_descramble[3]] = data; + break; + + case 0x16: + m_201x_regs[m_2012_2017_descramble[4]] = data; + break; + + case 0x17: + logerror("set reg 7 %02x\n", data); + m_201x_regs[m_2012_2017_descramble[5]] = data; + break; + + case 0x18: + logerror("set reg 8 %02x\n", data); + m_201x_regs[0x8] = data; + break; + + case 0x19: + // reset gun port (value doesn't matter) + break; + + case 0x1a: + m_201x_regs[0xa] = data; + break; + + case 0x1b: + // unused + break; + + case 0x1c: + // (READ) x-coordinate of gun + break; + + case 0x1d: + // (READ) y-coordinate of gun + break; + + case 0x1e: + // (READ) x-coordinate of gun 2 + break; + + case 0x1f: + // (READ) y-coordinate of gun 2 + break; } } + diff --git a/src/devices/video/ppu2c0x_vt.h b/src/devices/video/ppu2c0x_vt.h index 410a48e8839..c238f91b031 100644 --- a/src/devices/video/ppu2c0x_vt.h +++ b/src/devices/video/ppu2c0x_vt.h @@ -34,8 +34,9 @@ public: void set_palette_mode(vtxx_pal_mode pmode) { m_pal_mode = pmode; } void set_201x_descramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5); - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; + uint8_t read_extended(offs_t offset); + void write_extended(offs_t offset, uint8_t data); + virtual uint8_t palette_read(offs_t offset) override; virtual void palette_write(offs_t offset, uint8_t data) override; |