mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
(MESS) another round of cartslot updates. this commit, among the
other things, restores the functionality of cgenie ROM expansion which had been lost probably around 2009. nw.
This commit is contained in:
parent
41e890d778
commit
9dbddfa405
@ -488,6 +488,25 @@ static const floppy_interface cgenie_floppy_interface =
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
// TODO: investigate this! I think it is some sort of expansion of the DOS cart...
|
||||
DEVICE_IMAGE_LOAD_MEMBER( cgenie_state, cgenie_cart )
|
||||
{
|
||||
UINT32 size = m_cart->common_get_size("rom");
|
||||
|
||||
if (size > 0x1000)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
m_cart->rom_alloc(0x1000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||
m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( cgenie_common, cgenie_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_17_73447MHz/8) /* 2,2168 MHz */
|
||||
@ -535,9 +554,11 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state )
|
||||
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(cgenie_floppy_interface)
|
||||
|
||||
/* cartridge */
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_EXTENSION_LIST("rom")
|
||||
MCFG_CARTSLOT_NOT_MANDATORY
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cgenie_cart")
|
||||
MCFG_GENERIC_EXTENSIONS("bin,rom")
|
||||
MCFG_GENERIC_LOAD(cgenie_state, cgenie_cart)
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "cgenie_cart")
|
||||
|
||||
/* internal ram */
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
@ -565,7 +586,6 @@ ROM_START (cgenie)
|
||||
ROM_REGION(0x13000,"maincpu",0)
|
||||
ROM_LOAD ("cgenie.rom", 0x00000, 0x4000, CRC(d359ead7) SHA1(d8c2fc389ad38c45fba0ed556a7d91abac5463f4))
|
||||
ROM_LOAD ("cgdos.rom", 0x10000, 0x2000, CRC(2a96cf74) SHA1(6dcac110f87897e1ee7521aefbb3d77a14815893))
|
||||
ROM_CART_LOAD("cart", 0x12000, 0x1000, ROM_NOMIRROR | ROM_OPTIONAL)
|
||||
|
||||
ROM_REGION(0x0c00,"gfx1",0)
|
||||
ROM_LOAD ("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff))
|
||||
@ -582,7 +602,6 @@ ROM_START (cgenienz)
|
||||
ROM_SYSTEM_BIOS(1, "new", "New ROM")
|
||||
ROMX_LOAD( "cgromv2.rom", 0x0000, 0x4000, CRC(cfb84e09) SHA1(e199e4429bab6f9fca2bb05e71324538928a693a), ROM_BIOS(2) )
|
||||
ROM_LOAD ("cgdos.rom", 0x10000, 0x2000, CRC(2a96cf74) SHA1(6dcac110f87897e1ee7521aefbb3d77a14815893))
|
||||
ROM_CART_LOAD("cart", 0x12000, 0x1000, ROM_NOMIRROR | ROM_OPTIONAL)
|
||||
|
||||
ROM_REGION(0x0c00,"gfx1",0)
|
||||
ROM_LOAD ("cgenie1.fnt", 0x0000, 0x0800, CRC(4fed774a) SHA1(d53df8212b521892cc56be690db0bb474627d2ff))
|
||||
|
@ -9,15 +9,10 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/wave.h"
|
||||
#include "includes/orion.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "imagedev/cartslot.h"
|
||||
#include "formats/smx_dsk.h"
|
||||
#include "formats/rk_cas.h"
|
||||
#include "includes/orion.h"
|
||||
|
||||
/* Address maps */
|
||||
|
||||
@ -124,7 +119,7 @@ static MACHINE_CONFIG_START( orion128, orion_state )
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
|
||||
MCFG_CASSETTE_INTERFACE("orion_cass")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","orion_cass")
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list", "orion_cass")
|
||||
|
||||
MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
|
||||
|
||||
@ -134,9 +129,9 @@ static MACHINE_CONFIG_START( orion128, orion_state )
|
||||
MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", orion_state::orion_floppy_formats)
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list","orion_flop")
|
||||
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_INTERFACE("orion_cart")
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list","orion_cart")
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "orion_cart")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "orion_cart")
|
||||
|
||||
/* internal ram */
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
@ -203,7 +198,7 @@ static MACHINE_CONFIG_START( orionz80, orion_state )
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
|
||||
MCFG_CASSETTE_INTERFACE("orion_cass")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","orion_cass")
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list", "orion_cass")
|
||||
|
||||
MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
|
||||
|
||||
@ -213,9 +208,9 @@ static MACHINE_CONFIG_START( orionz80, orion_state )
|
||||
MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", orion_state::orion_floppy_formats)
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list","orion_flop")
|
||||
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_INTERFACE("orion_cart")
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list","orion_cart")
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "orion_cart")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "orion_cart")
|
||||
|
||||
/* internal ram */
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
@ -278,7 +273,7 @@ static MACHINE_CONFIG_START( orionpro, orion_state )
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
|
||||
MCFG_CASSETTE_INTERFACE("orion_cass")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","orion_cass")
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list", "orion_cass")
|
||||
|
||||
MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
|
||||
|
||||
@ -289,9 +284,9 @@ static MACHINE_CONFIG_START( orionpro, orion_state )
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list","orionpro_flop")
|
||||
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop128_list","orion_flop")
|
||||
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_INTERFACE("orion_cart")
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list","orion_cart")
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "orion_cart")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "orion_cart")
|
||||
|
||||
/* internal ram */
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
@ -307,13 +302,11 @@ ROM_START( orion128 )
|
||||
ROMX_LOAD( "m2rk.bin", 0x0f800, 0x0800, CRC(2025c234) SHA1(caf86918629be951fe698cddcdf4589f07e2fb96), ROM_BIOS(1) )
|
||||
ROM_SYSTEM_BIOS( 1, "m2_2rk", "Version 3.2.2 rk" )
|
||||
ROMX_LOAD( "m2_2rk.bin", 0x0f800, 0x0800, CRC(fc662351) SHA1(7c6de67127fae5869281449de1c503597c0c058e), ROM_BIOS(2) )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( orionms )
|
||||
ROM_REGION( 0x30000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ms7007.bin", 0x0f800, 0x0800, CRC(c6174ba3) SHA1(8f9a42c3e09684718fe4121a8408e7860129d26f) )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( orionz80 )
|
||||
@ -330,13 +323,11 @@ ROM_START( orionz80 )
|
||||
ROMX_LOAD( "m35zrkd.bin", 0x0f800, 0x0800, CRC(9368b38f) SHA1(64a77f22119d40c9b18b64d78ad12acc6fff9efb), ROM_BIOS(5) )
|
||||
ROM_SYSTEM_BIOS( 5, "peter", "Peterburg '91" )
|
||||
ROMX_LOAD( "peter.bin", 0x0f800, 0x0800, CRC(df9b1d8c) SHA1(c7f1e074e58ad1c1799cf522161b4f4cffa5aefa), ROM_BIOS(6) )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( orionide )
|
||||
ROM_REGION( 0x30000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "m35zrkh.bin", 0x0f800, 0x0800, CRC(b7745f28) SHA1(c3bd3e662db7ec56ecbab54bf6b3a4c26200d0bb) )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( orionzms )
|
||||
@ -347,18 +338,15 @@ ROM_START( orionzms )
|
||||
ROMX_LOAD( "m34zms.bin", 0x0f800, 0x0800, CRC(0f87a80b) SHA1(ab1121092e61268d8162ed8a7d4fd081016a409a), ROM_BIOS(2) )
|
||||
ROM_SYSTEM_BIOS( 2, "m35zmsd", "Version 3.5 zmsd" )
|
||||
ROMX_LOAD( "m35zmsd.bin", 0x0f800, 0x0800, CRC(f714ff37) SHA1(fbe9514adb3384aff146cbedd4fede37ce9591e1), ROM_BIOS(3) )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( orionidm )
|
||||
ROM_REGION( 0x30000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "m35zmsh.bin", 0x0f800, 0x0800, CRC(01e66df4) SHA1(8c785a3c32fe3eacda73ec79157b41a6e4b63ba8) )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( orionpro )
|
||||
ROM_REGION( 0x32000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_OPTIONAL)
|
||||
ROM_SYSTEM_BIOS( 0, "ver21", "Version 2.1" )
|
||||
ROMX_LOAD( "rom1-210.bin", 0x20000, 0x2000, CRC(8e1a0c78) SHA1(61c8a5ed596ce7e3fd32da920dcc80dc5375b421), ROM_BIOS(1) )
|
||||
ROMX_LOAD( "rom2-210.bin", 0x22000, 0x10000, CRC(7cb7a49b) SHA1(601f3dd61db323407c4874fd7f23c10dccac0209), ROM_BIOS(1) )
|
||||
|
@ -6,7 +6,8 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "imagedev/cartslot.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
// PV-1000 Sound device
|
||||
|
||||
@ -143,15 +144,16 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_sound(*this, "pv1000_sound"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_p_videoram(*this, "p_videoram"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(pv1000_io_w);
|
||||
DECLARE_READ8_MEMBER(pv1000_io_r);
|
||||
DECLARE_WRITE8_MEMBER(pv1000_gfxram_w);
|
||||
DECLARE_WRITE8_MEMBER(io_w);
|
||||
DECLARE_READ8_MEMBER(io_r);
|
||||
DECLARE_WRITE8_MEMBER(gfxram_w);
|
||||
UINT8 m_io_regs[8];
|
||||
UINT8 m_fd_data;
|
||||
|
||||
@ -167,6 +169,7 @@ public:
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<pv1000_sound_device> m_sound;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
required_shared_ptr<UINT8> m_p_videoram;
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
@ -182,19 +185,19 @@ public:
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( pv1000, AS_PROGRAM, 8, pv1000_state )
|
||||
AM_RANGE( 0x0000, 0x3fff ) AM_MIRROR( 0x4000 ) AM_ROM AM_REGION( "cart", 0 )
|
||||
AM_RANGE( 0xb800, 0xbbff ) AM_RAM AM_SHARE("p_videoram")
|
||||
AM_RANGE( 0xbc00, 0xbfff ) AM_RAM_WRITE( pv1000_gfxram_w ) AM_REGION( "gfxram", 0 )
|
||||
//AM_RANGE(0x0000, 0x7fff) // mapped by the cartslot
|
||||
AM_RANGE(0xb800, 0xbbff) AM_RAM AM_SHARE("p_videoram")
|
||||
AM_RANGE(0xbc00, 0xbfff) AM_RAM_WRITE(gfxram_w) AM_REGION("gfxram", 0)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( pv1000_io, AS_IO, 8, pv1000_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK( 0xff )
|
||||
AM_RANGE( 0xf8, 0xff ) AM_READWRITE( pv1000_io_r, pv1000_io_w )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0xf8, 0xff) AM_READWRITE(io_r, io_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
WRITE8_MEMBER( pv1000_state::pv1000_gfxram_w )
|
||||
WRITE8_MEMBER( pv1000_state::gfxram_w )
|
||||
{
|
||||
UINT8 *gfxram = memregion( "gfxram" )->base();
|
||||
|
||||
@ -203,14 +206,14 @@ WRITE8_MEMBER( pv1000_state::pv1000_gfxram_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER( pv1000_state::pv1000_io_w )
|
||||
WRITE8_MEMBER( pv1000_state::io_w )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00:
|
||||
case 0x01:
|
||||
case 0x02:
|
||||
//logerror("pv1000_io_w offset=%02x, data=%02x (%03d)\n", offset, data , data);
|
||||
//logerror("io_w offset=%02x, data=%02x (%03d)\n", offset, data , data);
|
||||
m_sound->voice_w(space, offset, data);
|
||||
break;
|
||||
|
||||
@ -234,11 +237,11 @@ WRITE8_MEMBER( pv1000_state::pv1000_io_w )
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( pv1000_state::pv1000_io_r )
|
||||
READ8_MEMBER( pv1000_state::io_r )
|
||||
{
|
||||
UINT8 data = m_io_regs[offset];
|
||||
|
||||
// logerror("pv1000_io_r offset=%02x\n", offset );
|
||||
// logerror("io_r offset=%02x\n", offset );
|
||||
|
||||
switch ( offset )
|
||||
{
|
||||
@ -308,37 +311,17 @@ PALETTE_INIT_MEMBER(pv1000_state, pv1000)
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER( pv1000_state, pv1000_cart )
|
||||
{
|
||||
UINT8 *cart = memregion("cart")->base();
|
||||
UINT32 size;
|
||||
|
||||
if (image.software_entry() == NULL)
|
||||
size = image.length();
|
||||
else
|
||||
size = image.get_software_region_length("rom");
|
||||
|
||||
|
||||
UINT32 size = m_cart->common_get_size("rom");
|
||||
|
||||
if (size != 0x2000 && size != 0x4000)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
if (image.software_entry() == NULL)
|
||||
{
|
||||
if (image.fread( cart, size) != size)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
memcpy(cart, image.get_software_region("rom"), size);
|
||||
|
||||
|
||||
/* Mirror 8KB rom */
|
||||
if (size == 0x2000)
|
||||
memcpy(cart + 0x2000, cart, 0x2000);
|
||||
|
||||
|
||||
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||
m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
||||
@ -406,7 +389,7 @@ void pv1000_state::pv1000_postload()
|
||||
{
|
||||
// restore GFX ram
|
||||
for (int i = 0; i < 0x400; i++)
|
||||
pv1000_gfxram_w(m_maincpu->space(AS_PROGRAM), i, m_gfxram[i]);
|
||||
gfxram_w(m_maincpu->space(AS_PROGRAM), i, m_gfxram[i]);
|
||||
}
|
||||
|
||||
void pv1000_state::machine_start()
|
||||
@ -417,6 +400,15 @@ void pv1000_state::machine_start()
|
||||
m_gfxram = memregion("gfxram")->base();
|
||||
save_pointer(NAME(m_gfxram), 0x400);
|
||||
|
||||
if (m_cart->exists())
|
||||
{
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x0000, 0x7fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
|
||||
|
||||
// FIXME: this is needed for gfx decoding, but there is probably a cleaner solution!
|
||||
astring region_tag;
|
||||
memcpy(memregion("gfxrom")->base(), memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG))->base(), m_cart->get_rom_size());
|
||||
}
|
||||
|
||||
save_item(NAME(m_io_regs));
|
||||
save_item(NAME(m_fd_data));
|
||||
save_item(NAME(m_pcg_bank));
|
||||
@ -450,7 +442,7 @@ static const gfx_layout pv1000_3bpp_gfx =
|
||||
|
||||
|
||||
static GFXDECODE_START( pv1000 )
|
||||
GFXDECODE_ENTRY( "cart", 8, pv1000_3bpp_gfx, 0, 8 )
|
||||
GFXDECODE_ENTRY( "gfxrom", 8, pv1000_3bpp_gfx, 0, 8 )
|
||||
GFXDECODE_ENTRY( "gfxram", 8, pv1000_3bpp_gfx, 0, 8 )
|
||||
GFXDECODE_END
|
||||
|
||||
@ -478,11 +470,9 @@ static MACHINE_CONFIG_START( pv1000, pv1000_state )
|
||||
MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
|
||||
|
||||
/* Cartridge slot */
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_EXTENSION_LIST("bin")
|
||||
MCFG_CARTSLOT_MANDATORY
|
||||
MCFG_CARTSLOT_INTERFACE("pv1000_cart")
|
||||
MCFG_CARTSLOT_LOAD(pv1000_state,pv1000_cart)
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "pv1000_cart")
|
||||
MCFG_GENERIC_MANDATORY
|
||||
MCFG_GENERIC_LOAD(pv1000_state, pv1000_cart)
|
||||
|
||||
/* Software lists */
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list","pv1000")
|
||||
@ -490,7 +480,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
|
||||
ROM_START( pv1000 )
|
||||
ROM_REGION( 0x4000, "cart", ROMREGION_ERASE00 )
|
||||
ROM_REGION( 0x4000, "gfxrom", ROMREGION_ERASE00 )
|
||||
ROM_REGION( 0x400, "gfxram", ROMREGION_ERASE00 )
|
||||
ROM_END
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "sound/wave.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "imagedev/cartslot.h"
|
||||
#include "formats/rk_cas.h"
|
||||
#include "includes/radio86.h"
|
||||
|
||||
@ -379,7 +378,7 @@ static MACHINE_CONFIG_START( radio86, radio86_state )
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED)
|
||||
MCFG_CASSETTE_INTERFACE("radio86_cass")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list","radio86")
|
||||
MCFG_SOFTWARE_LIST_ADD("cass_list", "radio86_cass")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -395,13 +394,14 @@ static MACHINE_CONFIG_DERIVED( radiorom, radio86 )
|
||||
MCFG_CPU_PROGRAM_MAP(radio86rom_mem)
|
||||
|
||||
MCFG_DEVICE_ADD("ppi8255_2", I8255, 0)
|
||||
MCFG_I8255_IN_PORTA_CB(READ8(radio86_state, radio86_romdisk_porta_r))
|
||||
MCFG_I8255_IN_PORTA_CB(READ8(radio86_state, radio86rom_romdisk_porta_r))
|
||||
MCFG_I8255_OUT_PORTB_CB(WRITE8(radio86_state, radio86_romdisk_portb_w))
|
||||
MCFG_I8255_OUT_PORTC_CB(WRITE8(radio86_state, radio86_romdisk_portc_w))
|
||||
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_EXTENSION_LIST("bin,rom")
|
||||
MCFG_CARTSLOT_NOT_MANDATORY
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "radio86_cart")
|
||||
MCFG_GENERIC_EXTENSIONS("bin,rom")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "radio86_cart")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( radioram, radio86 )
|
||||
@ -410,7 +410,7 @@ static MACHINE_CONFIG_DERIVED( radioram, radio86 )
|
||||
MCFG_CPU_PROGRAM_MAP(radio86ram_mem)
|
||||
|
||||
MCFG_DEVICE_ADD("ppi8255_2", I8255, 0)
|
||||
MCFG_I8255_IN_PORTA_CB(READ8(radio86_state, radio86_romdisk_porta_r))
|
||||
MCFG_I8255_IN_PORTA_CB(READ8(radio86_state, radio86ram_romdisk_porta_r))
|
||||
MCFG_I8255_OUT_PORTB_CB(WRITE8(radio86_state, radio86_romdisk_portb_w))
|
||||
MCFG_I8255_OUT_PORTC_CB(WRITE8(radio86_state, radio86_romdisk_portc_w))
|
||||
MACHINE_CONFIG_END
|
||||
@ -486,27 +486,26 @@ ROM_END
|
||||
ROM_START( radiorom )
|
||||
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_SYSTEM_BIOS(0, "32k", "32 KB rom disk")
|
||||
ROMX_LOAD( "radiorom.rom", 0xf800, 0x0800, CRC(B5CDEAB7) SHA1(1c80d72082f2fb2190b575726cb82d86ae0ee7d8), ROM_BIOS(1))
|
||||
ROMX_LOAD( "radiorom.rom", 0xf800, 0x0800, CRC(b5cdeab7) SHA1(1c80d72082f2fb2190b575726cb82d86ae0ee7d8), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS(1, "64k", "64 KB rom disk")
|
||||
ROMX_LOAD( "radiorom.64", 0xf800, 0x0800, CRC(5250b927) SHA1(e885e0f5b2325190b38a4c92b20a8b4fa78fbd8f), ROM_BIOS(2))
|
||||
ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 )
|
||||
ROM_CART_LOAD("cart", 0x10000, 0x10000, ROM_NOMIRROR | ROM_OPTIONAL)
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc))
|
||||
ROM_END
|
||||
|
||||
ROM_START( radioram )
|
||||
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "r86-1.bin", 0xf800, 0x0800, CRC(7E7AB7CB) SHA1(fedb00b6b8fbe1167faba3e4611b483f800e6934))
|
||||
ROM_LOAD( "r86-1.bin", 0xf800, 0x0800, CRC(7e7ab7cb) SHA1(fedb00b6b8fbe1167faba3e4611b483f800e6934))
|
||||
ROM_LOAD( "r86-2.bin", 0xe000, 0x0800, CRC(955F0616) SHA1(d2b9f960558bdcb60074091fc79d1ad56c313586))
|
||||
ROM_LOAD( "romdisk.bin", 0x10000, 0x10000, CRC(43C0279B) SHA1(bc1dfd9bdbce39460616e2158f5d96279d0af3cf))
|
||||
ROM_LOAD( "romdisk.bin", 0x10000, 0x10000, CRC(43c0279b) SHA1(bc1dfd9bdbce39460616e2158f5d96279d0af3cf))
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc))
|
||||
ROM_END
|
||||
|
||||
ROM_START( rk7007 )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ms7007.rom", 0xf800, 0x0800, CRC(002811DC) SHA1(4529eb72198c49af77fbcd7833bcd06a1cf9b1ac))
|
||||
ROM_LOAD( "ms7007.rom", 0xf800, 0x0800, CRC(002811dc) SHA1(4529eb72198c49af77fbcd7833bcd06a1cf9b1ac))
|
||||
ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 )
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc))
|
||||
@ -514,7 +513,7 @@ ROM_END
|
||||
|
||||
ROM_START( rk700716 )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "ms7007.16k", 0xf800, 0x0800, CRC(5268D7B6) SHA1(efd69d8456b8cf8b37f33237153c659725608528))
|
||||
ROM_LOAD( "ms7007.16k", 0xf800, 0x0800, CRC(5268d7b6) SHA1(efd69d8456b8cf8b37f33237153c659725608528))
|
||||
ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 )
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("radio86.fnt", 0x0000, 0x0400, CRC(7666bd5e) SHA1(8652787603bee9b4da204745e3b2aa07a4783dfc))
|
||||
@ -530,7 +529,7 @@ ROM_END
|
||||
|
||||
ROM_START( kr03 )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "kr03-dd17.rf2", 0xf800, 0x0800, CRC(AC2E24D5) SHA1(a1317a261bfd55b3b37109b14d1391308dee04de))
|
||||
ROM_LOAD( "kr03-dd17.rf2", 0xf800, 0x0800, CRC(ac2e24d5) SHA1(a1317a261bfd55b3b37109b14d1391308dee04de))
|
||||
ROM_COPY( "maincpu", 0xf800, 0xf000, 0x0800 )
|
||||
ROM_REGION(0x0800, "gfx1",0)
|
||||
ROM_LOAD ("kr03-dd12.rf2", 0x0000, 0x0800, CRC(085F4259) SHA1(11c5829b072a00961ad936c26559fb63bf2dc896))
|
||||
|
@ -157,28 +157,6 @@ http://www.z88forever.org.uk/zxplus3e/
|
||||
#include "machine/beta.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
enum
|
||||
{
|
||||
TIMEX_CART_NONE,
|
||||
TIMEX_CART_DOCK,
|
||||
TIMEX_CART_EXROM,
|
||||
TIMEX_CART_HOME
|
||||
};
|
||||
|
||||
struct timex_cart_t
|
||||
{
|
||||
int type;
|
||||
UINT8 chunks;
|
||||
UINT8 *data;
|
||||
};
|
||||
|
||||
static timex_cart_t timex_cart;
|
||||
|
||||
const timex_cart_t *timex_cart_data(void)
|
||||
{
|
||||
return &timex_cart;
|
||||
}
|
||||
|
||||
/****************************************************************************************************/
|
||||
/* TS2048 specific functions */
|
||||
|
||||
@ -234,13 +212,9 @@ void spectrum_state::ts2068_update_memory()
|
||||
{
|
||||
UINT8 *messram = m_ram->pointer();
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
unsigned char *ChosenROM, *ExROM;
|
||||
const timex_cart_t *timex_cart = timex_cart_data();
|
||||
int timex_cart_type = timex_cart->type;
|
||||
UINT8 timex_cart_chunks = timex_cart->chunks;
|
||||
UINT8 *DOCK = timex_cart->data;
|
||||
|
||||
ExROM = memregion("maincpu")->base() + 0x014000;
|
||||
UINT8 *DOCK = m_dock_crt->base();
|
||||
UINT8 *ExROM = memregion("maincpu")->base() + 0x014000;
|
||||
UINT8 *ChosenROM;
|
||||
|
||||
if (m_port_f4_data & 0x01)
|
||||
{
|
||||
@ -253,11 +227,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank1")->set_base(DOCK);
|
||||
space.install_read_bank(0x0000, 0x1fff, "bank1");
|
||||
if (timex_cart_chunks&0x01)
|
||||
if (m_ram_chunks & 0x01)
|
||||
space.install_write_bank(0x0000, 0x1fff, "bank9");
|
||||
else
|
||||
space.unmap_write(0x0000, 0x1fff);
|
||||
@ -292,11 +266,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank2")->set_base(DOCK+0x2000);
|
||||
space.install_read_bank(0x2000, 0x3fff, "bank2");
|
||||
if (timex_cart_chunks&0x02)
|
||||
if (m_ram_chunks & 0x02)
|
||||
space.install_write_bank(0x2000, 0x3fff, "bank10");
|
||||
else
|
||||
space.unmap_write(0x2000, 0x3fff);
|
||||
@ -330,11 +304,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank3")->set_base(DOCK+0x4000);
|
||||
space.install_read_bank(0x4000, 0x5fff, "bank3");
|
||||
if (timex_cart_chunks&0x04)
|
||||
if (m_ram_chunks & 0x04)
|
||||
space.install_write_bank(0x4000, 0x5fff, "bank11");
|
||||
else
|
||||
space.unmap_write(0x4000, 0x5fff);
|
||||
@ -367,11 +341,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank4")->set_base(DOCK+0x6000);
|
||||
space.install_read_bank(0x6000, 0x7fff, "bank4");
|
||||
if (timex_cart_chunks&0x08)
|
||||
if (m_ram_chunks & 0x08)
|
||||
space.install_write_bank(0x6000, 0x7fff, "bank12");
|
||||
else
|
||||
space.unmap_write(0x6000, 0x7fff);
|
||||
@ -404,11 +378,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank5")->set_base(DOCK+0x8000);
|
||||
space.install_read_bank(0x8000, 0x9fff,"bank5");
|
||||
if (timex_cart_chunks&0x10)
|
||||
if (m_ram_chunks & 0x10)
|
||||
space.install_write_bank(0x8000, 0x9fff,"bank13");
|
||||
else
|
||||
space.unmap_write(0x8000, 0x9fff);
|
||||
@ -441,11 +415,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank6")->set_base(DOCK+0xa000);
|
||||
space.install_read_bank(0xa000, 0xbfff, "bank6");
|
||||
if (timex_cart_chunks&0x20)
|
||||
if (m_ram_chunks & 0x20)
|
||||
space.install_write_bank(0xa000, 0xbfff, "bank14");
|
||||
else
|
||||
space.unmap_write(0xa000, 0xbfff);
|
||||
@ -479,11 +453,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank7")->set_base(DOCK+0xc000);
|
||||
space.install_read_bank(0xc000, 0xdfff, "bank7");
|
||||
if (timex_cart_chunks&0x40)
|
||||
if (m_ram_chunks & 0x40)
|
||||
space.install_write_bank(0xc000, 0xdfff, "bank15");
|
||||
else
|
||||
space.unmap_write(0xc000, 0xdfff);
|
||||
@ -516,11 +490,11 @@ void spectrum_state::ts2068_update_memory()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (timex_cart_type == TIMEX_CART_DOCK)
|
||||
if (m_dock_cart_type == TIMEX_CART_DOCK)
|
||||
{
|
||||
membank("bank8")->set_base(DOCK+0xe000);
|
||||
space.install_read_bank(0xe000, 0xffff, "bank8");
|
||||
if (timex_cart_chunks&0x80)
|
||||
if (m_ram_chunks & 0x80)
|
||||
space.install_write_bank(0xe000, 0xffff, "bank16");
|
||||
else
|
||||
space.unmap_write(0xe000, 0xffff);
|
||||
@ -570,9 +544,13 @@ MACHINE_RESET_MEMBER(spectrum_state,ts2068)
|
||||
{
|
||||
m_port_ff_data = 0;
|
||||
m_port_f4_data = 0;
|
||||
|
||||
astring region_tag;
|
||||
m_dock_crt = memregion(region_tag.cpy(m_dock->tag()).cat(GENERIC_ROM_REGION_TAG));
|
||||
m_dock_cart_type = (m_dock->exists()) ? TIMEX_CART_DOCK : TIMEX_CART_NONE;
|
||||
|
||||
ts2068_update_memory();
|
||||
MACHINE_RESET_CALL_MEMBER(spectrum);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -613,88 +591,68 @@ MACHINE_RESET_MEMBER(spectrum_state,tc2048)
|
||||
|
||||
DEVICE_IMAGE_LOAD_MEMBER( spectrum_state, timex_cart )
|
||||
{
|
||||
int file_size;
|
||||
dynamic_buffer file_data;
|
||||
|
||||
UINT32 size = m_dock->common_get_size("rom");
|
||||
UINT8 *DOCK;
|
||||
int chunks_in_file = 0;
|
||||
dynamic_buffer header;
|
||||
header.resize(9);
|
||||
|
||||
int i;
|
||||
|
||||
logerror ("Trying to load cart\n");
|
||||
|
||||
file_size = image.length();
|
||||
|
||||
if (file_size < 0x09)
|
||||
if (size % 0x2000 != 9)
|
||||
{
|
||||
logerror ("Bad file size\n");
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "File corrupted");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
file_data.resize(file_size);
|
||||
|
||||
image.fread(file_data, file_size);
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
if(file_data[i+1]&0x02) chunks_in_file++;
|
||||
|
||||
if (chunks_in_file*0x2000+0x09 != file_size)
|
||||
if (image.software_entry() != NULL)
|
||||
{
|
||||
logerror ("File corrupted\n");
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Loading from softlist is not supported yet");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
m_dock->rom_alloc(0x10000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||
DOCK = m_dock->get_rom_base();
|
||||
|
||||
switch (file_data[0x00])
|
||||
// check header
|
||||
image.fread(header, 9);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
if (header[i + 1] & 0x02) chunks_in_file++;
|
||||
|
||||
if (chunks_in_file * 0x2000 + 0x09 != size)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "File corrupted");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
switch (header[0])
|
||||
{
|
||||
case 0x00: logerror ("DOCK cart\n");
|
||||
timex_cart.type = TIMEX_CART_DOCK;
|
||||
timex_cart.data = global_alloc_array(UINT8, 0x10000);
|
||||
if (!timex_cart.data)
|
||||
m_ram_chunks = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
m_ram_chunks = m_ram_chunks | ((header[i + 1] & 0x01) << i);
|
||||
if (header[i + 1] & 0x02)
|
||||
image.fread(DOCK + i * 0x2000, 0x2000);
|
||||
else
|
||||
{
|
||||
logerror ("Memory allocate error\n");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
chunks_in_file = 0;
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
timex_cart.chunks = timex_cart.chunks | ((file_data[i+1]&0x01)<<i);
|
||||
if (file_data[i+1]&0x02)
|
||||
{
|
||||
memcpy (timex_cart.data+i*0x2000, file_data+0x09+chunks_in_file*0x2000, 0x2000);
|
||||
chunks_in_file++;
|
||||
}
|
||||
if (header[i + 1] & 0x01)
|
||||
memset(DOCK + i * 0x2000, 0x00, 0x2000);
|
||||
else
|
||||
{
|
||||
if (file_data[i+1]&0x01)
|
||||
memset (timex_cart.data+i*0x2000, 0x00, 0x2000);
|
||||
else
|
||||
memset (timex_cart.data+i*0x2000, 0xff, 0x2000);
|
||||
}
|
||||
memset(DOCK + i * 0x2000, 0xff, 0x2000);
|
||||
}
|
||||
break;
|
||||
|
||||
default: logerror ("Cart type not supported\n");
|
||||
timex_cart.type = TIMEX_CART_NONE;
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Cart type not supported");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
logerror ("Cart loaded [Chunks %02x]\n", m_ram_chunks);
|
||||
|
||||
logerror ("Cart loaded\n");
|
||||
logerror ("Chunks %02x\n", timex_cart.chunks);
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
|
||||
|
||||
DEVICE_IMAGE_UNLOAD_MEMBER( spectrum_state, timex_cart )
|
||||
{
|
||||
if (timex_cart.data)
|
||||
{
|
||||
global_free_array(timex_cart.data);
|
||||
timex_cart.data = NULL;
|
||||
}
|
||||
timex_cart.type = TIMEX_CART_NONE;
|
||||
timex_cart.chunks = 0x00;
|
||||
}
|
||||
|
||||
|
||||
/* F4 Character Displayer - tc2048 code is inherited from the spectrum */
|
||||
static const gfx_layout ts2068_charlayout =
|
||||
{
|
||||
@ -737,12 +695,9 @@ static MACHINE_CONFIG_DERIVED( ts2068, spectrum_128 )
|
||||
|
||||
/* cartridge */
|
||||
MCFG_DEVICE_REMOVE("cartslot")
|
||||
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_EXTENSION_LIST("dck")
|
||||
MCFG_CARTSLOT_NOT_MANDATORY
|
||||
MCFG_CARTSLOT_LOAD(spectrum_state,timex_cart)
|
||||
MCFG_CARTSLOT_UNLOAD(spectrum_state,timex_cart)
|
||||
MCFG_GENERIC_CARTSLOT_ADD("dockslot", generic_plain_slot, NULL)
|
||||
MCFG_GENERIC_EXTENSIONS("dck")
|
||||
MCFG_GENERIC_LOAD(spectrum_state, timex_cart)
|
||||
|
||||
/* internal ram */
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
@ -788,7 +743,6 @@ MACHINE_CONFIG_END
|
||||
ROM_START(tc2048)
|
||||
ROM_REGION(0x10000,"maincpu",0)
|
||||
ROM_LOAD("tc2048.rom",0x0000,0x4000, CRC(f1b5fa67) SHA1(febb2d495b6eda7cdcb4074935d6e9d9f328972d))
|
||||
ROM_CART_LOAD("cart", 0x0000, 0x4000, ROM_NOCLEAR | ROM_NOMIRROR | ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START(ts2068)
|
||||
|
@ -183,9 +183,10 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(vector_floppy_interface)
|
||||
|
||||
/* cartridge */
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
MCFG_CARTSLOT_EXTENSION_LIST("emr")
|
||||
MCFG_CARTSLOT_NOT_MANDATORY
|
||||
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "vector06_cart")
|
||||
MCFG_GENERIC_EXTENSIONS("bin,emr")
|
||||
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list", "vector06_cart")
|
||||
|
||||
/* internal ram */
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
@ -196,7 +197,7 @@ MACHINE_CONFIG_END
|
||||
/* ROM definition */
|
||||
|
||||
ROM_START( vector06 )
|
||||
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_SYSTEM_BIOS(0, "unboot32k", "Universal Boot 32K")
|
||||
ROMX_LOAD( "unboot32k.rt", 0x10000, 0x8000, CRC(28c9b5cd) SHA1(8cd7fb658896a7066ae93b10eaafa0f12139ad81), ROM_BIOS(1))
|
||||
ROM_SYSTEM_BIOS(1, "unboot2k", "Universal Boot 2K")
|
||||
@ -209,28 +210,24 @@ ROM_START( vector06 )
|
||||
ROMX_LOAD( "bootos.rt", 0x10000, 0x0200, CRC(46bef038) SHA1(6732f4a360cd38112c53c458842d31f5b035cf59), ROM_BIOS(5))
|
||||
ROM_SYSTEM_BIOS(5, "boot512", "Boot 512")
|
||||
ROMX_LOAD( "boot512.rt", 0x10000, 0x0200, CRC(a0b1c6b2) SHA1(f6fe15cb0974aed30f9b7aa72133324a66d1ed3f), ROM_BIOS(6))
|
||||
ROM_CART_LOAD("cart", 0x18000, 0x8000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( vec1200 )
|
||||
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "vec1200.bin", 0x10000, 0x2000, CRC(37349224) SHA1(060fbb2c1a89040c929521cfd58cb6f1431a8b75))
|
||||
ROM_CART_LOAD("cart", 0x18000, 0x8000, ROM_OPTIONAL)
|
||||
|
||||
ROM_REGION( 0x0200, "palette", 0 )
|
||||
ROM_LOAD( "palette.bin", 0x0000, 0x0200, CRC(74b7376b) SHA1(fb56b60babd7e6ed68e5f4e791ad2800d7ef6729))
|
||||
ROM_END
|
||||
|
||||
ROM_START( pk6128c )
|
||||
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "6128.bin", 0x10000, 0x4000, CRC(d4f68433) SHA1(ef5ac75f9240ca8996689c23642d4e47e5e774d8))
|
||||
ROM_CART_LOAD("cart", 0x18000, 0x8000, ROM_OPTIONAL)
|
||||
ROM_END
|
||||
|
||||
ROM_START( krista2 )
|
||||
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x18000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "krista2.epr", 0x10000, 0x0200, CRC(df5440b0) SHA1(bcbbb3cc10aeb17c1262b45111d20279266b9ba4))
|
||||
ROM_CART_LOAD("cart", 0x18000, 0x8000, ROM_OPTIONAL)
|
||||
ROM_LOAD( "krista2.pal", 0x0000, 0x0200, CRC(b243da33) SHA1(9af7873e6f8bf452c8d831833ffb02dce833c095))
|
||||
ROM_END
|
||||
/* Driver */
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/ram.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
// CRTC 6845
|
||||
struct CRTC6845
|
||||
@ -46,6 +48,7 @@ public:
|
||||
m_fontram(*this, "fontram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_ay8910(*this, "ay8910"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
@ -91,6 +94,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(cgenie_sh_control_port_w);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<ay8910_device> m_ay8910;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
@ -143,6 +147,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( cgenie_index_w );
|
||||
DECLARE_WRITE8_MEMBER( cgenie_register_w );
|
||||
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cgenie_cart);
|
||||
};
|
||||
|
||||
#endif /* CGENIE_H_ */
|
||||
|
@ -9,11 +9,14 @@
|
||||
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "includes/radio86.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/mc146818.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/wave.h"
|
||||
|
||||
|
||||
class orion_state : public radio86_state
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "machine/i8257.h"
|
||||
#include "video/i8275.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
|
||||
class radio86_state : public driver_device
|
||||
@ -25,6 +27,7 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_dma8257(*this, "dma8257"),
|
||||
m_ppi8255_1(*this, "ppi8255_1"),
|
||||
m_ppi8255_2(*this, "ppi8255_2"),
|
||||
@ -73,7 +76,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(radio86_8255_portc_w2);
|
||||
DECLARE_READ8_MEMBER(rk7007_8255_portc_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(hrq_w);
|
||||
DECLARE_READ8_MEMBER(radio86_romdisk_porta_r);
|
||||
DECLARE_READ8_MEMBER(radio86rom_romdisk_porta_r);
|
||||
DECLARE_READ8_MEMBER(radio86ram_romdisk_porta_r);
|
||||
DECLARE_WRITE8_MEMBER(radio86_romdisk_portb_w);
|
||||
DECLARE_WRITE8_MEMBER(radio86_romdisk_portc_w);
|
||||
DECLARE_WRITE8_MEMBER(mikrosha_8255_font_page_w);
|
||||
@ -84,6 +88,7 @@ public:
|
||||
|
||||
protected:
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
optional_device<generic_slot_device> m_cart; // for ROMDisk - only Radio86K & Orion?
|
||||
optional_device<i8257_device> m_dma8257;
|
||||
required_device<i8255_device> m_ppi8255_1;
|
||||
optional_device<i8255_device> m_ppi8255_2;
|
||||
|
@ -70,6 +70,15 @@ struct EVENT_LIST_ITEM
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TIMEX_CART_NONE,
|
||||
TIMEX_CART_DOCK,
|
||||
TIMEX_CART_EXROM,
|
||||
TIMEX_CART_HOME
|
||||
};
|
||||
|
||||
|
||||
class spectrum_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -81,6 +90,7 @@ public:
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_dock(*this, "dockslot"),
|
||||
m_upd765(*this, "upd765"),
|
||||
m_upd765_0(*this, "upd765:0"),
|
||||
m_upd765_1(*this, "upd765:1"),
|
||||
@ -171,8 +181,11 @@ public:
|
||||
void screen_eof_spectrum(screen_device &screen, bool state);
|
||||
INTERRUPT_GEN_MEMBER(spec_interrupt);
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( spectrum_cart );
|
||||
|
||||
// for timex cart only
|
||||
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( timex_cart );
|
||||
DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( timex_cart );
|
||||
int m_dock_cart_type, m_ram_chunks;
|
||||
memory_region *m_dock_crt;
|
||||
|
||||
unsigned int m_previous_border_x, m_previous_border_y;
|
||||
bitmap_ind16 m_border_bitmap;
|
||||
@ -192,6 +205,7 @@ protected:
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
optional_device<generic_slot_device> m_cart;
|
||||
optional_device<generic_slot_device> m_dock;
|
||||
optional_device<upd765a_device> m_upd765;
|
||||
optional_device<floppy_connector> m_upd765_0;
|
||||
optional_device<floppy_connector> m_upd765_1;
|
||||
|
@ -15,9 +15,10 @@
|
||||
#include "machine/ram.h"
|
||||
#include "machine/wd17xx.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "imagedev/cartslot.h"
|
||||
#include "imagedev/flopdrv.h"
|
||||
#include "formats/basicdsk.h"
|
||||
#include "bus/generic/slot.h"
|
||||
#include "bus/generic/carts.h"
|
||||
|
||||
|
||||
class vector06_state : public driver_device
|
||||
@ -27,6 +28,7 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_cart(*this, "cartslot"),
|
||||
m_fdc(*this, "wd1793"),
|
||||
m_ppi(*this, "ppi8255"),
|
||||
m_ppi2(*this, "ppi8255_2"),
|
||||
@ -36,6 +38,7 @@ public:
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<generic_slot_device> m_cart;
|
||||
required_device<fd1793_device> m_fdc;
|
||||
required_device<i8255_device> m_ppi;
|
||||
required_device<i8255_device> m_ppi2;
|
||||
@ -57,7 +60,7 @@ public:
|
||||
UINT8 m_keyboard_mask;
|
||||
UINT8 m_color_index;
|
||||
UINT8 m_video_mode;
|
||||
UINT16 m_romdisk_msb;
|
||||
UINT8 m_romdisk_msb;
|
||||
UINT8 m_romdisk_lsb;
|
||||
UINT8 m_vblank_state;
|
||||
void vector06_set_video_mode(int width);
|
||||
|
@ -101,18 +101,15 @@ void cgenie_state::machine_reset()
|
||||
}
|
||||
|
||||
/* copy EXT ROM, if enabled or wipe out that memory area */
|
||||
if( ioport("DSW0")->read() & 0x20 )
|
||||
if (ioport("DSW0")->read() & 0x20 && m_cart->exists())
|
||||
{
|
||||
space.install_rom(0xe000, 0xefff, 0); // mess 0135u3 need to check
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000, 0xefff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
|
||||
logerror("cgenie EXT enabled\n");
|
||||
memcpy(&memregion("maincpu")->base()[0x0e000],
|
||||
&memregion("maincpu")->base()[0x12000], 0x1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
space.nop_readwrite(0xe000, 0xefff);
|
||||
logerror("cgenie EXT disabled\n");
|
||||
memset(&memregion("maincpu")->base()[0x0e000], 0x00, 0x1000);
|
||||
}
|
||||
|
||||
m_cass_level = 0;
|
||||
|
@ -22,8 +22,11 @@
|
||||
|
||||
READ8_MEMBER(orion_state::orion_romdisk_porta_r)
|
||||
{
|
||||
UINT8 *romdisk = m_region_maincpu->base() + 0x10000;
|
||||
return romdisk[m_romdisk_msb*256+m_romdisk_lsb];
|
||||
UINT16 addr = (m_romdisk_msb << 8) | m_romdisk_lsb;
|
||||
if (m_cart->exists() && addr < m_cart->get_rom_size())
|
||||
return m_cart->read_rom(space, addr);
|
||||
else
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(orion_state::orion_romdisk_portb_w)
|
||||
|
@ -155,7 +155,16 @@ WRITE8_MEMBER(radio86_state::radio86_pagesel)
|
||||
m_disk_sel = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(radio86_state::radio86_romdisk_porta_r)
|
||||
READ8_MEMBER(radio86_state::radio86rom_romdisk_porta_r)
|
||||
{
|
||||
UINT16 addr = (m_romdisk_msb << 8) | m_romdisk_lsb;
|
||||
if (m_cart->exists() && addr < m_cart->get_rom_size())
|
||||
return m_cart->read_rom(space, addr);
|
||||
else
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
READ8_MEMBER(radio86_state::radio86ram_romdisk_porta_r)
|
||||
{
|
||||
UINT8 *romdisk = m_region_maincpu->base() + 0x10000;
|
||||
if ((m_disk_sel & 0x0f) ==0) {
|
||||
|
@ -66,9 +66,11 @@ WRITE8_MEMBER( vector06_state::vector06_color_set )
|
||||
|
||||
READ8_MEMBER( vector06_state::vector06_romdisk_portb_r )
|
||||
{
|
||||
UINT8 *romdisk = memregion("maincpu")->base() + 0x18000;
|
||||
UINT16 addr = (m_romdisk_msb | m_romdisk_lsb) & 0x7fff;
|
||||
return romdisk[addr];
|
||||
UINT16 addr = (m_romdisk_msb << 8) | m_romdisk_lsb;
|
||||
if (m_cart->exists() && addr < m_cart->get_rom_size())
|
||||
return m_cart->read_rom(space, addr);
|
||||
else
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( vector06_state::vector06_romdisk_porta_w )
|
||||
@ -78,7 +80,7 @@ WRITE8_MEMBER( vector06_state::vector06_romdisk_porta_w )
|
||||
|
||||
WRITE8_MEMBER( vector06_state::vector06_romdisk_portc_w )
|
||||
{
|
||||
m_romdisk_msb = data << 8;
|
||||
m_romdisk_msb = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER( vector06_state::vector06_8255_1_r )
|
||||
|
Loading…
Reference in New Issue
Block a user