From 6ef43ba25d18e6b84eb921400d1ba57098016b3c Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sun, 30 Mar 2014 00:20:03 +0400 Subject: [PATCH] iskr103x: CGA clone --- src/emu/bus/isa/cga.c | 62 +++++++++++++++++++++++++++++++------ src/emu/bus/isa/cga.h | 30 ++++++++++++++++-- src/mess/drivers/iskr103x.c | 6 ---- 3 files changed, 80 insertions(+), 18 deletions(-) diff --git a/src/emu/bus/isa/cga.c b/src/emu/bus/isa/cga.c index 0487f05753c..8e545116601 100644 --- a/src/emu/bus/isa/cga.c +++ b/src/emu/bus/isa/cga.c @@ -1750,16 +1750,6 @@ void isa8_ec1841_0002_device::device_reset() m_p3df = 0; } -ROM_START( iskr1031 ) - ROM_REGION(0x2000,"gfx1", 0) - ROM_LOAD( "iskra-1031_font.bin", 0x0000, 0x2000, CRC(f4d62e80) SHA1(ad7e81a0c9abc224671422bbcf6f6262da92b510)) -ROM_END - -const rom_entry *isa8_ec1841_0002_device::device_rom_region() const -{ - return ROM_NAME( iskr1031 ); -} - WRITE8_MEMBER( isa8_ec1841_0002_device::char_ram_write ) { offset ^= BIT(offset, 12); @@ -1827,6 +1817,58 @@ isa8_cga_mc1502_device::isa8_cga_mc1502_device(const machine_config &mconfig, co } +ROM_START( cga_iskr1031 ) + ROM_REGION(0x2000,"gfx1", 0) + ROM_LOAD( "iskra-1031_font.bin", 0x0000, 0x2000, CRC(f4d62e80) SHA1(ad7e81a0c9abc224671422bbcf6f6262da92b510)) +ROM_END + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *isa8_cga_iskr1031_device::device_rom_region() const +{ + return ROM_NAME( cga_iskr1031 ); +} + +const device_type ISA8_CGA_ISKR1031 = &device_creator; + +//------------------------------------------------- +// isa8_cga_iskr1031_device - constructor +//------------------------------------------------- + +isa8_cga_iskr1031_device::isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + isa8_cga_device( mconfig, ISA8_CGA_ISKR1031, "Iskra-1031 CGA", tag, owner, clock, "cga_iskr1031", __FILE__) +{ +} + +ROM_START( cga_iskr1030m ) + ROM_REGION(0x2000,"gfx1", 0) + ROM_LOAD( "iskra-1030m.chr", 0x0000, 0x2000, CRC(50b162eb) SHA1(5bd7cb1705a69bd16115a4c9ed1c2748a5c8ad51)) +ROM_END + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *isa8_cga_iskr1030m_device::device_rom_region() const +{ + return ROM_NAME( cga_iskr1030m ); +} + +const device_type ISA8_CGA_ISKR1030M = &device_creator; + +//------------------------------------------------- +// isa8_cga_iskr1030m_device - constructor +//------------------------------------------------- + +isa8_cga_iskr1030m_device::isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + isa8_cga_device( mconfig, ISA8_CGA_ISKR1030M, "Iskra-1030M CGA", tag, owner, clock, "cga_iskr1030m", __FILE__) +{ +} + +// XXX + ROM_START( mc1502 ) ROM_REGION(0x2000,"gfx1", 0) // taken from mc1502 diff --git a/src/emu/bus/isa/cga.h b/src/emu/bus/isa/cga.h index 4e088fd1b37..068a04b1773 100644 --- a/src/emu/bus/isa/cga.h +++ b/src/emu/bus/isa/cga.h @@ -198,8 +198,6 @@ class isa8_ec1841_0002_device : public: // construction/destruction isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - // optional information overrides - virtual const rom_entry *device_rom_region() const; protected: // device-level overrides @@ -218,6 +216,34 @@ public: // device type definition extern const device_type ISA8_EC1841_0002; +// ======================> isa8_cga_iskr1031_device + +class isa8_cga_iskr1030m_device : + public isa8_cga_device +{ +public: + // construction/destruction + isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual const rom_entry *device_rom_region() const; +}; + +// device type definition +extern const device_type ISA8_CGA_ISKR1030M; + +// ======================> isa8_cga_iskr1031_device + +class isa8_cga_iskr1031_device : + public isa8_cga_device +{ +public: + // construction/destruction + isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual const rom_entry *device_rom_region() const; +}; + +// device type definition +extern const device_type ISA8_CGA_ISKR1031; + // ======================> isa8_cga_mc1502_device class isa8_cga_mc1502_device : diff --git a/src/mess/drivers/iskr103x.c b/src/mess/drivers/iskr103x.c index 017b57cf5e3..4b8f55fd704 100644 --- a/src/mess/drivers/iskr103x.c +++ b/src/mess/drivers/iskr103x.c @@ -120,9 +120,6 @@ ROM_START( iskr1030m ) ROM_REGION16_LE(0x100000,"maincpu", 0) ROMX_LOAD( "iskra-1030m_0.rom", 0xfc000, 0x2000, CRC(0d698e19) SHA1(2fe117c9f4f8c4b59085d5a41f919d743c425fdd), ROM_SKIP(1)) ROMX_LOAD( "iskra-1030m_1.rom", 0xfc001, 0x2000, CRC(fe808337) SHA1(b0b7ebe14324ada8aa9a6926a82b18e80f78a257), ROM_SKIP(1)) - - ROM_REGION(0x2000,"gfx1", 0) - ROM_LOAD( "iskra-1030m.chr", 0x0000, 0x2000, CRC(50b162eb) SHA1(5bd7cb1705a69bd16115a4c9ed1c2748a5c8ad51)) ROM_END ROM_START( iskr1031 ) @@ -133,9 +130,6 @@ ROM_START( iskr1031 ) ROM_SYSTEM_BIOS(1, "v2", "v2") ROMX_LOAD( "150-06.bin", 0xfc000, 0x2000, CRC(1adbf969) SHA1(08c0a0fc50a75e6207b1987bae389cca60893eac), ROM_SKIP(1) | ROM_BIOS(2)) ROMX_LOAD( "150-07.bin", 0xfc001, 0x2000, CRC(0dc4b65a) SHA1(c96f066251a7343eac8113ea9dcb2cb12d0334d5), ROM_SKIP(1) | ROM_BIOS(2)) - - //ROM_REGION(0x2000,"gfx1", 0) - //ROM_LOAD( "iskra-1031_font.bin", 0x0000, 0x2000, CRC(f4d62e80) SHA1(ad7e81a0c9abc224671422bbcf6f6262da92b510)) ROM_END /***************************************************************************