diff options
author | 2014-10-15 07:19:47 +0000 | |
---|---|---|
committer | 2014-10-15 07:19:47 +0000 | |
commit | c93ed344fbd26a9c2c49bdbc99014d8dc0cbe9ef (patch) | |
tree | a5017b8341bdadc5bcd1185ae49fe4c0a85424b8 /src/emu/bus/a800 | |
parent | a4dd32afb6cbfaae0e452c90486060682ab1c31c (diff) |
Cleanups and version bumpmame0155
Diffstat (limited to 'src/emu/bus/a800')
-rw-r--r-- | src/emu/bus/a800/a800_carts.h | 6 | ||||
-rw-r--r-- | src/emu/bus/a800/a800_slot.c | 53 | ||||
-rw-r--r-- | src/emu/bus/a800/a800_slot.h | 18 | ||||
-rw-r--r-- | src/emu/bus/a800/oss.c | 31 | ||||
-rw-r--r-- | src/emu/bus/a800/oss.h | 16 | ||||
-rw-r--r-- | src/emu/bus/a800/rom.c | 89 | ||||
-rw-r--r-- | src/emu/bus/a800/rom.h | 50 | ||||
-rw-r--r-- | src/emu/bus/a800/sparta.c | 15 | ||||
-rw-r--r-- | src/emu/bus/a800/sparta.h | 6 |
9 files changed, 140 insertions, 144 deletions
diff --git a/src/emu/bus/a800/a800_carts.h b/src/emu/bus/a800/a800_carts.h index 8a67ef656a0..eb28c9c3b2c 100644 --- a/src/emu/bus/a800/a800_carts.h +++ b/src/emu/bus/a800/a800_carts.h @@ -14,7 +14,7 @@ static SLOT_INTERFACE_START(a800_left) SLOT_INTERFACE_INTERNAL("a800_8k", A800_ROM) SLOT_INTERFACE_INTERNAL("a800_8k_right", A800_ROM) SLOT_INTERFACE_INTERNAL("a800_16k", A800_ROM) - SLOT_INTERFACE_INTERNAL("a800_phoenix", A800_ROM) // not really emulated at this stage + SLOT_INTERFACE_INTERNAL("a800_phoenix", A800_ROM) // not really emulated at this stage SLOT_INTERFACE_INTERNAL("a800_bbsb", A800_ROM_BBSB) SLOT_INTERFACE_INTERNAL("a800_oss8k", A800_ROM_OSS8K) SLOT_INTERFACE_INTERNAL("a800_oss034m", A800_ROM_OSS34) @@ -23,13 +23,13 @@ static SLOT_INTERFACE_START(a800_left) SLOT_INTERFACE_INTERNAL("a800_williams", A800_ROM_WILLIAMS) SLOT_INTERFACE_INTERNAL("a800_diamond", A800_ROM_EXPRESS) SLOT_INTERFACE_INTERNAL("a800_express", A800_ROM_EXPRESS) - SLOT_INTERFACE_INTERNAL("a800_sparta", A800_ROM_SPARTADOS) // this is a passthru cart with unemulated (atm) subslot + SLOT_INTERFACE_INTERNAL("a800_sparta", A800_ROM_SPARTADOS) // this is a passthru cart with unemulated (atm) subslot SLOT_INTERFACE_INTERNAL("a800_blizzard", A800_ROM) SLOT_INTERFACE_INTERNAL("a800_turbo64", A800_ROM_TURBO) SLOT_INTERFACE_INTERNAL("a800_turbo128", A800_ROM_TURBO) SLOT_INTERFACE_INTERNAL("a800_tlink2", A800_ROM_TELELINK2) SLOT_INTERFACE_INTERNAL("a800_sitsa", A800_ROM_MICROCALC) - SLOT_INTERFACE_INTERNAL("a800_corina", A800_ROM) // NOT SUPPORTED YET! + SLOT_INTERFACE_INTERNAL("a800_corina", A800_ROM) // NOT SUPPORTED YET! SLOT_INTERFACE_INTERNAL("xegs", XEGS_ROM) SLOT_INTERFACE_END diff --git a/src/emu/bus/a800/a800_slot.c b/src/emu/bus/a800/a800_slot.c index 0a86342247f..e6d06c936e6 100644 --- a/src/emu/bus/a800/a800_slot.c +++ b/src/emu/bus/a800/a800_slot.c @@ -6,12 +6,12 @@ Atari 8 bit cart emulation (through slot devices) - Emulation of the cartslot(s) for Atari 8bit series of home computers - + Emulation of the cartslot(s) for Atari 8bit series of home computers + Accessors to ROM are typically given in the area 0xa000-0xbfff, but some carts (and the right slot in A800) maps ROM to 0x8000-0x9fff too Bankswitch typically happens by accessing addresses in 0xd500-0xd5ff - + Accordingly, this device offers the following handlers - read_80xx/write_80xx - read_d5xx/write_d5xx @@ -67,9 +67,9 @@ void device_a800_cart_interface::rom_alloc(UINT32 size, const char *tag) tempstring.cat(A800SLOT_ROM_REGION_TAG); m_rom = device().machine().memory().region_alloc(tempstring, size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; - + // setup other helpers - m_bank_mask = (size / 0x2000) - 1; // code for XEGS carts makes use of this to simplify banking + m_bank_mask = (size / 0x2000) - 1; // code for XEGS carts makes use of this to simplify banking } } @@ -243,15 +243,15 @@ bool a800_cart_slot_device::call_load() if (m_cart) { UINT32 len; - + if (software_entry() != NULL) { const char *pcb_name; len = get_software_region_length("rom"); - + m_cart->rom_alloc(len, tag()); memcpy(m_cart->get_rom_base(), get_software_region("rom"), len); - + if ((pcb_name = get_feature("slot")) != NULL) m_type = a800_get_pcb_id(pcb_name); else @@ -267,9 +267,9 @@ bool a800_cart_slot_device::call_load() UINT8 header[16]; fread(header, 0x10); m_type = identify_cart_type(header); - len -= 0x10; // in identify_cart_type the first 0x10 bytes are read, so we need to adjust here + len -= 0x10; // in identify_cart_type the first 0x10 bytes are read, so we need to adjust here } - else // otherwise try to guess based on size + else // otherwise try to guess based on size { if (len == 0x8000) m_type = A5200_32K; @@ -323,7 +323,7 @@ int a800_cart_slot_device::identify_cart_type(UINT8 *header) // check CART format if (strncmp((const char *)header, "CART", 4)) fatalerror("Invalid header detected!\n"); - + switch ((header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0)) { case 1: @@ -400,7 +400,7 @@ int a800_cart_slot_device::identify_cart_type(UINT8 *header) osd_printf_info("Cart type \"%d\" is currently unsupported.\n", (header[4] << 24) + (header[5] << 16) + (header[6] << 8) + (header[7] << 0)); break; } - + return type; } @@ -420,10 +420,10 @@ void a800_cart_slot_device::get_default_card_software(astring &result) // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { - core_fread(m_file, head, 0x10); + core_fread(m_file, head, 0x10); type = identify_cart_type(head); } - else // otherwise try to guess based on size + else // otherwise try to guess based on size { if (len == 0x4000) type = A800_16K; @@ -435,9 +435,9 @@ void a800_cart_slot_device::get_default_card_software(astring &result) osd_printf_info("This game is not designed for A800. You might want to run it in A5200.\n"); slot_string = a800_get_slot(type); - + clear(); - + result.cpy(slot_string); } else @@ -453,11 +453,11 @@ void a5200_cart_slot_device::get_default_card_software(astring &result) dynamic_buffer head(0x10); UINT32 len = core_fsize(m_file); int type = A5200_8K; - + // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { - core_fread(m_file, head, 0x10); + core_fread(m_file, head, 0x10); type = identify_cart_type(head); astring info; @@ -466,11 +466,11 @@ void a5200_cart_slot_device::get_default_card_software(astring &result) } if (type < A5200_4K) osd_printf_info("This game is not designed for A5200. You might want to run it in A800 or A800XL.\n"); - + slot_string = a800_get_slot(type); - + clear(); - + result.cpy(slot_string); } else @@ -486,11 +486,11 @@ void xegs_cart_slot_device::get_default_card_software(astring &result) dynamic_buffer head(0x10); UINT32 len = core_fsize(m_file); int type = A800_8K; - + // check whether there is an header, to identify the cart type if ((len % 0x1000) == 0x10) { - core_fread(m_file, head, 0x10); + core_fread(m_file, head, 0x10); type = identify_cart_type(head); } if (type != A800_XEGS) @@ -501,11 +501,11 @@ void xegs_cart_slot_device::get_default_card_software(astring &result) else osd_printf_info("You might want to run it in A800 or A800XL.\n"); } - + slot_string = a800_get_slot(type); - + clear(); - + result.cpy(slot_string); } else @@ -549,4 +549,3 @@ WRITE8_MEMBER(a800_cart_slot_device::write_d5xx) if (m_cart) m_cart->write_d5xx(space, offset, data, mem_mask); } - diff --git a/src/emu/bus/a800/a800_slot.h b/src/emu/bus/a800/a800_slot.h index 536ed38da3e..b9e4f491d73 100644 --- a/src/emu/bus/a800/a800_slot.h +++ b/src/emu/bus/a800/a800_slot.h @@ -20,11 +20,11 @@ enum A800_OSSM091, A800_OSS8K, A800_PHOENIX, - A800_XEGS, - A800_BBSB, + A800_XEGS, + A800_BBSB, A800_DIAMOND, A800_WILLIAMS, - A800_EXPRESS, + A800_EXPRESS, A800_SPARTADOS, A800_BLIZZARD, A800_TURBO64, @@ -71,7 +71,7 @@ protected: UINT8 *m_rom; UINT32 m_rom_size; dynamic_buffer m_ram; - dynamic_buffer m_nvram; // HiScore cart can save scores! + dynamic_buffer m_nvram; // HiScore cart can save scores! // helpers int m_bank_mask; }; @@ -101,7 +101,7 @@ public: int get_cart_type() { return m_type; }; int identify_cart_type(UINT8 *header); bool has_cart() { return m_cart != NULL; } - + virtual iodevice_t image_type() const { return IO_CARTSLOT; } virtual bool is_readable() const { return 1; } virtual bool is_writeable() const { return 0; } @@ -120,7 +120,7 @@ public: virtual DECLARE_READ8_MEMBER(read_d5xx); virtual DECLARE_WRITE8_MEMBER(write_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + private: device_a800_cart_interface* m_cart; int m_type; @@ -138,9 +138,9 @@ public: // construction/destruction a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual ~a5200_cart_slot_device(); - + virtual const char *file_extensions() const { return "bin,rom,car,a52"; } - + // slot interface overrides virtual void get_default_card_software(astring &result); }; @@ -155,7 +155,7 @@ public: virtual ~xegs_cart_slot_device(); virtual const char *file_extensions() const { return "bin,rom,car"; } - + // slot interface overrides virtual void get_default_card_software(astring &result); }; diff --git a/src/emu/bus/a800/oss.c b/src/emu/bus/a800/oss.c index 1cf4d176d68..3df4f2b0ed4 100644 --- a/src/emu/bus/a800/oss.c +++ b/src/emu/bus/a800/oss.c @@ -95,11 +95,11 @@ void a800_rom_oss91_device::device_reset() -------------------------------------------------*/ /*------------------------------------------------- - + OSS 8K - + This is used by The Writer's Tool only. - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_oss8k_device::read_80xx) @@ -128,12 +128,12 @@ WRITE8_MEMBER(a800_rom_oss8k_device::write_d5xx) /*------------------------------------------------- - + OSS 034M - + This apparently comes from a dump with the wrong bank order... investigate whether we should remove it! - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_oss34_device::read_80xx) @@ -156,7 +156,7 @@ WRITE8_MEMBER(a800_rom_oss34_device::write_d5xx) break; case 2: case 6: - m_bank = 3; // in this case the ROM gets disabled and 0xff is returned in 0xa000-0xafff + m_bank = 3; // in this case the ROM gets disabled and 0xff is returned in 0xa000-0xafff break; case 3: case 7: @@ -173,11 +173,11 @@ WRITE8_MEMBER(a800_rom_oss34_device::write_d5xx) /*------------------------------------------------- - + OSS 043M - + Same as above but with correct bank order - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_oss43_device::read_80xx) @@ -200,7 +200,7 @@ WRITE8_MEMBER(a800_rom_oss43_device::write_d5xx) break; case 2: case 6: - m_bank = 3; // in this case the ROM gets disabled and 0xff is returned in 0xa000-0xafff + m_bank = 3; // in this case the ROM gets disabled and 0xff is returned in 0xa000-0xafff break; case 3: case 7: @@ -217,12 +217,12 @@ WRITE8_MEMBER(a800_rom_oss43_device::write_d5xx) /*------------------------------------------------- - + OSS M091 - - Simplified banking system which only uses two + + Simplified banking system which only uses two address lines (A0 & A3) - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_oss91_device::read_80xx) @@ -250,4 +250,3 @@ WRITE8_MEMBER(a800_rom_oss91_device::write_d5xx) break; } } - diff --git a/src/emu/bus/a800/oss.h b/src/emu/bus/a800/oss.h index 5aef80526df..ad772689277 100644 --- a/src/emu/bus/a800/oss.h +++ b/src/emu/bus/a800/oss.h @@ -13,14 +13,14 @@ class a800_rom_oss8k_device : public a800_rom_device public: // construction/destruction a800_rom_oss8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -53,14 +53,14 @@ class a800_rom_oss43_device : public a800_rom_device public: // construction/destruction a800_rom_oss43_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -73,14 +73,14 @@ class a800_rom_oss91_device : public a800_rom_device public: // construction/destruction a800_rom_oss91_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; diff --git a/src/emu/bus/a800/rom.c b/src/emu/bus/a800/rom.c index b527c3b228d..ed11faa7d7b 100644 --- a/src/emu/bus/a800/rom.c +++ b/src/emu/bus/a800/rom.c @@ -3,7 +3,7 @@ /*********************************************************************************************************** A800/A5200/XEGS ROM cart emulation - + Basic carts work the same (in addition of being mostly compatible) for all these systems and thus we deal with them in a single file @@ -196,7 +196,7 @@ void a5200_rom_bbsb_device::device_reset() /*------------------------------------------------- Carts with no bankswitch (8K, 16K) - + The cart accessors are mapped in the correct range at driver start @@ -210,14 +210,14 @@ READ8_MEMBER(a800_rom_device::read_80xx) /*------------------------------------------------- - + Bounty Bob Strikes Back! cart (40K) - + Area 0xa000-0xbfff always point to last 8K bank - Areas 0x8000-0x8fff and 0x9000-0x9fff are + Areas 0x8000-0x8fff and 0x9000-0x9fff are separate banks of 4K mapped either in the first 16K chunk or in the second 16K chunk - Bankswitch is controlled by data written in + Bankswitch is controlled by data written in 0x8000-0x8fff and 0x9000-0x9fff respectively -------------------------------------------------*/ @@ -240,12 +240,12 @@ WRITE8_MEMBER(a800_rom_bbsb_device::write_80xx) } /*------------------------------------------------- - + XEGS carts (32K, 64K or 128K) - - Bankswitch is controlled by data written in + + Bankswitch is controlled by data written in 0xd500-0xd5ff - + -------------------------------------------------*/ READ8_MEMBER(xegs_rom_device::read_80xx) @@ -253,8 +253,8 @@ READ8_MEMBER(xegs_rom_device::read_80xx) if (offset < 0x2000) return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)]; else - return m_rom[(offset & 0x1fff) + (m_bank_mask * 0x2000)]; // always last 8K bank - + return m_rom[(offset & 0x1fff) + (m_bank_mask * 0x2000)]; // always last 8K bank + } WRITE8_MEMBER(xegs_rom_device::write_d5xx) @@ -264,16 +264,16 @@ WRITE8_MEMBER(xegs_rom_device::write_d5xx) /*------------------------------------------------- - + Williams 64K - + The rom is accessed in 8K chunks at 0xa000-0xbfff Bankswitch is controlled by writing to 7 diff - offsets (their location varies with the cart type): - offs 0 points to bank 0, offs 1 points to bank 1, - and so on... the rom can be disabled by writing to + offsets (their location varies with the cart type): + offs 0 points to bank 0, offs 1 points to bank 1, + and so on... the rom can be disabled by writing to the offsets 0x8-0xf of the same range as the bankswitch - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_williams_device::read_80xx) @@ -287,16 +287,16 @@ WRITE8_MEMBER(a800_rom_williams_device::write_d5xx) } /*------------------------------------------------- - + Express 64K / Diamond 64K carts - + The rom is accessed in 8K chunks at 0xa000-0xbfff - Bankswitch is the same as above, but writes trigger - banks in reverse order: offs 7 points to bank 0, offs 6 + Bankswitch is the same as above, but writes trigger + banks in reverse order: offs 7 points to bank 0, offs 6 points to bank 1, and so on... the rom can be disabled by writing to the offsets 0x8-0xf of the same range as the bankswitch - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_express_device::read_80xx) @@ -311,10 +311,10 @@ WRITE8_MEMBER(a800_rom_express_device::write_d5xx) /*------------------------------------------------- - + Turbosoft 64K / 128K - - + + -------------------------------------------------*/ READ8_MEMBER(a800_rom_turbo_device::read_80xx) @@ -329,10 +329,10 @@ WRITE8_MEMBER(a800_rom_turbo_device::write_d5xx) /*------------------------------------------------- - + Telelink II - - + + -------------------------------------------------*/ READ8_MEMBER(a800_rom_telelink2_device::read_80xx) @@ -347,7 +347,7 @@ READ8_MEMBER(a800_rom_telelink2_device::read_80xx) WRITE8_MEMBER(a800_rom_telelink2_device::write_80xx) { - m_nvram[offset & 0xff] = data | 0xf0; // low 4bits only + m_nvram[offset & 0xff] = data | 0xf0; // low 4bits only } READ8_MEMBER(a800_rom_telelink2_device::read_d5xx) @@ -364,10 +364,10 @@ WRITE8_MEMBER(a800_rom_telelink2_device::write_d5xx) /*------------------------------------------------- - + SITSA Microcalc - - + + -------------------------------------------------*/ READ8_MEMBER(a800_rom_microcalc_device::read_80xx) @@ -386,21 +386,21 @@ WRITE8_MEMBER(a800_rom_microcalc_device::write_d5xx) /*------------------------------------------------- - + Carts with no bankswitch (4K, 8K, 16K, 32K) - + Same as base carts above - + -------------------------------------------------*/ /*------------------------------------------------- - + Carts with 2x8K (16K) with A13 line not connected - + Range 0x4000-0x7fff contains two copies of the low 8K, range 0x8000-0xbfff contains two copies of the high 8K - + -------------------------------------------------*/ READ8_MEMBER(a5200_rom_2chips_device::read_80xx) @@ -413,18 +413,18 @@ READ8_MEMBER(a5200_rom_2chips_device::read_80xx) /*------------------------------------------------- - + Bounty Bob Strikes Back! cart (40K) - + Similar to the A800 version, but: Area 0x8000-0xbfff always point to last 8K bank (repeated twice) - Areas 0x4000-0x4fff and 0x5000-0x5fff are + Areas 0x4000-0x4fff and 0x5000-0x5fff are separate banks of 4K mapped either in the first 16K chunk or in the second 16K chunk - Bankswitch is controlled by data written in + Bankswitch is controlled by data written in 0x4000-0x4fff and 0x5000-0x5fff respectively - + -------------------------------------------------*/ READ8_MEMBER(a5200_rom_bbsb_device::read_80xx) @@ -445,4 +445,3 @@ WRITE8_MEMBER(a5200_rom_bbsb_device::write_80xx) if (addr >= 0xff6 && addr <= 0xff9) m_banks[BIT(offset, 12)] = (addr - 0xff6); } - diff --git a/src/emu/bus/a800/rom.h b/src/emu/bus/a800/rom.h index 55bb728a94f..4c4ea9b30c2 100644 --- a/src/emu/bus/a800/rom.h +++ b/src/emu/bus/a800/rom.h @@ -31,14 +31,14 @@ class a800_rom_bbsb_device : public a800_rom_device public: // construction/destruction a800_rom_bbsb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_80xx); - + protected: int m_banks[2]; }; @@ -51,14 +51,14 @@ class a800_rom_williams_device : public a800_rom_device public: // construction/destruction a800_rom_williams_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -71,14 +71,14 @@ class a800_rom_express_device : public a800_rom_device public: // construction/destruction a800_rom_express_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -91,11 +91,11 @@ class a800_rom_blizzard_device : public a800_rom_device public: // construction/destruction a800_rom_blizzard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); }; @@ -107,14 +107,14 @@ class a800_rom_turbo_device : public a800_rom_device public: // construction/destruction a800_rom_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -127,7 +127,7 @@ class a800_rom_telelink2_device : public a800_rom_device public: // construction/destruction a800_rom_telelink2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_80xx); virtual DECLARE_READ8_MEMBER(read_d5xx); @@ -142,14 +142,14 @@ class a800_rom_microcalc_device : public a800_rom_device public: // construction/destruction a800_rom_microcalc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -162,14 +162,14 @@ class xegs_rom_device : public a800_rom_device public: // construction/destruction xegs_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank; }; @@ -182,7 +182,7 @@ class a5200_rom_2chips_device : public a800_rom_device public: // construction/destruction a5200_rom_2chips_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + virtual DECLARE_READ8_MEMBER(read_80xx); }; @@ -194,14 +194,14 @@ class a5200_rom_bbsb_device : public a800_rom_device public: // construction/destruction a5200_rom_bbsb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_80xx); - + protected: int m_banks[2]; }; diff --git a/src/emu/bus/a800/sparta.c b/src/emu/bus/a800/sparta.c index 316dacb9fe9..a742be866c3 100644 --- a/src/emu/bus/a800/sparta.c +++ b/src/emu/bus/a800/sparta.c @@ -43,14 +43,14 @@ void a800_rom_spartados_device::device_reset() -------------------------------------------------*/ /*------------------------------------------------- - + SpartaDOS 64K carts - - Similar to Express / Diamond carts, because - bankswitch is controlled by writing to 7 diff - offsets in reverse order, but writes to offsets + + Similar to Express / Diamond carts, because + bankswitch is controlled by writing to 7 diff + offsets in reverse order, but writes to offsets 0x8-0xf also enable/disable subslot - + -------------------------------------------------*/ READ8_MEMBER(a800_rom_spartados_device::read_80xx) @@ -58,7 +58,7 @@ READ8_MEMBER(a800_rom_spartados_device::read_80xx) if (!m_subslot_enabled) return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)]; else - return 0xff; // subslot, currently not implemented + return 0xff; // subslot, currently not implemented } WRITE8_MEMBER(a800_rom_spartados_device::write_d5xx) @@ -69,4 +69,3 @@ WRITE8_MEMBER(a800_rom_spartados_device::write_d5xx) m_bank = (offset ^ 0x07) & 0x0f; } - diff --git a/src/emu/bus/a800/sparta.h b/src/emu/bus/a800/sparta.h index ef6033e7716..983c5ba9200 100644 --- a/src/emu/bus/a800/sparta.h +++ b/src/emu/bus/a800/sparta.h @@ -13,14 +13,14 @@ class a800_rom_spartados_device : public a800_rom_device public: // construction/destruction a800_rom_spartados_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_WRITE8_MEMBER(write_d5xx); - + protected: int m_bank, m_subslot_enabled; }; |