mirror of
https://github.com/holub/mame
synced 2025-06-26 14:24:12 +03:00
(MESS) Added PET cassette port slot interface to vic20, c64, and plus4. Implemented 1530/1531 datassette as slot devices. Converted MOS6581 interface to devcb. [Curt Coder]
(MESS) vic20: Added floating bus read support to VIC and cartridge interface. (MESS) vic10: Added floating bus read support to VIC-II and cartridge interface. (MESS) c64: Added floating bus read support to cartridge interface. [Curt Coder] (MESS) plus4: Added floating bus read support to TED and cartridge interface. Implemented some Diag264 test cartridge loopback connectors. [Curt Coder] (MESS) c16: Added PAL/NTSC variants. (nw) (MESS) v364: Fixed speech ROM mapping. (nw) (MESS) compis: Separated keyboard to its own file. (nw) (MESS) huebler: Cleanup. (nw)
This commit is contained in:
parent
c77db05c73
commit
08b42aabaa
12
.gitattributes
vendored
12
.gitattributes
vendored
@ -6468,6 +6468,8 @@ src/mess/machine/c2031.c svneol=native#text/plain
|
||||
src/mess/machine/c2031.h svneol=native#text/plain
|
||||
src/mess/machine/c2040.c svneol=native#text/plain
|
||||
src/mess/machine/c2040.h svneol=native#text/plain
|
||||
src/mess/machine/c2n.c svneol=native#text/plain
|
||||
src/mess/machine/c2n.h svneol=native#text/plain
|
||||
src/mess/machine/c64.c svneol=native#text/plain
|
||||
src/mess/machine/c64_16kb.c svneol=native#text/plain
|
||||
src/mess/machine/c64_16kb.h svneol=native#text/plain
|
||||
@ -6617,6 +6619,8 @@ src/mess/machine/cococart.h svneol=native#text/plain
|
||||
src/mess/machine/coleco.c svneol=native#text/plain
|
||||
src/mess/machine/coleco.h svneol=native#text/plain
|
||||
src/mess/machine/compis.c svneol=native#text/plain
|
||||
src/mess/machine/compiskb.c svneol=native#text/plain
|
||||
src/mess/machine/compiskb.h svneol=native#text/plain
|
||||
src/mess/machine/comx_clm.c svneol=native#text/plain
|
||||
src/mess/machine/comx_clm.h svneol=native#text/plain
|
||||
src/mess/machine/comx_eb.c svneol=native#text/plain
|
||||
@ -6660,6 +6664,12 @@ src/mess/machine/dec_lk201.c svneol=native#text/plain
|
||||
src/mess/machine/dec_lk201.h svneol=native#text/plain
|
||||
src/mess/machine/dgn_beta.c svneol=native#text/plain
|
||||
src/mess/machine/dgnalpha.c svneol=native#text/plain
|
||||
src/mess/machine/diag264_lb_iec.c svneol=native#text/plain
|
||||
src/mess/machine/diag264_lb_iec.h svneol=native#text/plain
|
||||
src/mess/machine/diag264_lb_tape.c svneol=native#text/plain
|
||||
src/mess/machine/diag264_lb_tape.h svneol=native#text/plain
|
||||
src/mess/machine/diag264_lb_user.c svneol=native#text/plain
|
||||
src/mess/machine/diag264_lb_user.h svneol=native#text/plain
|
||||
src/mess/machine/docg3.c svneol=native#text/plain
|
||||
src/mess/machine/docg3.h svneol=native#text/plain
|
||||
src/mess/machine/dp8390.c svneol=native#text/plain
|
||||
@ -6907,6 +6917,8 @@ src/mess/machine/pcf8593.c svneol=native#text/plain
|
||||
src/mess/machine/pcf8593.h svneol=native#text/plain
|
||||
src/mess/machine/pecom.c svneol=native#text/plain
|
||||
src/mess/machine/pet.c svneol=native#text/plain
|
||||
src/mess/machine/petcass.c svneol=native#text/plain
|
||||
src/mess/machine/petcass.h svneol=native#text/plain
|
||||
src/mess/machine/pf10.c svneol=native#text/plain
|
||||
src/mess/machine/pf10.h svneol=native#text/plain
|
||||
src/mess/machine/pk8020.c svneol=native#text/plain
|
||||
|
@ -94,6 +94,7 @@ struct _mos6560_state
|
||||
/* DMA */
|
||||
mos6560_dma_read dma_read;
|
||||
mos6560_dma_read_color dma_read_color;
|
||||
UINT8 last_data;
|
||||
|
||||
/* lightpen */
|
||||
mos6560_lightpen_button_callback lightpen_button_cb;
|
||||
@ -215,6 +216,7 @@ static void mos6560_draw_character( device_t *device, int ybegin, int yend, int
|
||||
for (y = ybegin; y <= yend; y++)
|
||||
{
|
||||
code = mos6560->dma_read(device->machine(), (mos6560->chargenaddr + ch * mos6560->charheight + y) & 0x3fff);
|
||||
mos6560->last_data = code;
|
||||
mos6560->bitmap->pix16(y + yoff, xoff + 0) = color[code >> 7];
|
||||
mos6560->bitmap->pix16(y + yoff, xoff + 1) = color[(code >> 6) & 1];
|
||||
mos6560->bitmap->pix16(y + yoff, xoff + 2) = color[(code >> 5) & 1];
|
||||
@ -239,6 +241,7 @@ static void mos6560_draw_character_multi( device_t *device, int ybegin, int yend
|
||||
for (y = ybegin; y <= yend; y++)
|
||||
{
|
||||
code = mos6560->dma_read(device->machine(), (mos6560->chargenaddr + ch * mos6560->charheight + y) & 0x3fff);
|
||||
mos6560->last_data = code;
|
||||
mos6560->bitmap->pix16(y + yoff, xoff + 0) =
|
||||
mos6560->bitmap->pix16(y + yoff, xoff + 1) = color[code >> 6];
|
||||
mos6560->bitmap->pix16(y + yoff, xoff + 2) =
|
||||
@ -299,6 +302,7 @@ static void mos6560_drawlines( device_t *device, int first, int last )
|
||||
for (xoff = mos6560->xpos; (xoff < mos6560->xpos + mos6560->xsize) && (xoff < mos6560->total_xsize); xoff += 8, offs++)
|
||||
{
|
||||
ch = mos6560->dma_read(device->machine(), (mos6560->videoaddr + offs) & 0x3fff);
|
||||
mos6560->last_data = ch;
|
||||
attr = (mos6560->dma_read_color(device->machine(), (mos6560->videoaddr + offs) & 0x3fff)) & 0xf;
|
||||
|
||||
if (mos6560->type == MOS6560_ATTACKUFO)
|
||||
@ -485,6 +489,12 @@ READ8_DEVICE_HANDLER( mos6560_port_r )
|
||||
return val;
|
||||
}
|
||||
|
||||
UINT8 mos6560_bus_r( device_t *device )
|
||||
{
|
||||
mos6560_state *mos6560 = get_safe_token(device);
|
||||
|
||||
return mos6560->last_data;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
mos6560_raster_interrupt_gen
|
||||
@ -874,6 +884,8 @@ static DEVICE_START( mos6560 )
|
||||
device->save_item(NAME(mos6560->multi));
|
||||
device->save_item(NAME(mos6560->multiinverted));
|
||||
|
||||
device->save_item(NAME(mos6560->last_data));
|
||||
|
||||
device->save_item(NAME(*mos6560->bitmap));
|
||||
|
||||
device->save_item(NAME(mos6560->tone1pos));
|
||||
|
@ -106,6 +106,7 @@ DECLARE_LEGACY_SOUND_DEVICE(MOS656X, mos6560);
|
||||
WRITE8_DEVICE_HANDLER( mos6560_port_w );
|
||||
READ8_DEVICE_HANDLER( mos6560_port_r );
|
||||
|
||||
UINT8 mos6560_bus_r( device_t *device );
|
||||
void mos6560_raster_interrupt_gen( device_t *device );
|
||||
UINT32 mos6560_video_update( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
|
||||
|
@ -336,14 +336,14 @@ int sid6581_port_r (running_machine &machine, _SID6581 *This, int offset)
|
||||
data=0xff;
|
||||
break;
|
||||
case 0x19: /* paddle 1 */
|
||||
if (This->ad_read != NULL)
|
||||
data=This->ad_read (This->device, 0);
|
||||
if (!This->in_potx_func.isnull())
|
||||
data = This->in_potx_func(offset);
|
||||
else
|
||||
data=0;
|
||||
break;
|
||||
case 0x1a: /* paddle 2 */
|
||||
if (This->ad_read != NULL)
|
||||
data=This->ad_read (This->device, 1);
|
||||
if (!This->in_poty_func.isnull())
|
||||
data = This->in_poty_func(offset);
|
||||
else
|
||||
data=0;
|
||||
break;
|
||||
|
@ -17,7 +17,9 @@ typedef struct __SID6581
|
||||
device_t *device;
|
||||
sound_stream *mixer_channel; // mame stream/ mixer channel
|
||||
|
||||
int (*ad_read) (device_t *device, int which);
|
||||
devcb_resolved_read8 in_potx_func;
|
||||
devcb_resolved_read8 in_poty_func;
|
||||
|
||||
SIDTYPE type;
|
||||
UINT32 clock;
|
||||
|
||||
|
@ -34,11 +34,14 @@ static void sid_start(device_t *device, SIDTYPE sidtype)
|
||||
_SID6581 *sid = get_sid(device);
|
||||
const sid6581_interface *iface = (const sid6581_interface*) device->static_config();
|
||||
|
||||
// resolve callbacks
|
||||
sid->in_potx_func.resolve(iface->in_potx_cb, *device);
|
||||
sid->in_poty_func.resolve(iface->in_poty_cb, *device);
|
||||
|
||||
sid->device = device;
|
||||
sid->mixer_channel = device->machine().sound().stream_alloc(*device, 0, 1, device->machine().sample_rate(), (void *) sid, sid_update);
|
||||
sid->PCMfreq = device->machine().sample_rate();
|
||||
sid->clock = device->clock();
|
||||
sid->ad_read = iface ? iface->ad_read : NULL;
|
||||
sid->type = sidtype;
|
||||
|
||||
sid6581_init(sid);
|
||||
|
@ -20,12 +20,15 @@ typedef enum
|
||||
MOS8580
|
||||
} SIDTYPE;
|
||||
|
||||
#define MOS6581_INTERFACE(name) \
|
||||
const sid6581_interface (name) =
|
||||
|
||||
typedef struct _sid6581_interface sid6581_interface;
|
||||
struct _sid6581_interface
|
||||
{
|
||||
int (*ad_read)(device_t *device, int channel);
|
||||
} ;
|
||||
devcb_read8 in_potx_cb;
|
||||
devcb_read8 in_poty_cb;
|
||||
};
|
||||
|
||||
|
||||
READ8_DEVICE_HANDLER ( sid6581_r );
|
||||
|
@ -483,6 +483,8 @@ void mos7360_device::draw_character(int ybegin, int yend, int ch, int yoff, int
|
||||
else
|
||||
code = m_in_ram_func(m_chargenaddr + ch * 8 + y);
|
||||
|
||||
m_last_data = code;
|
||||
|
||||
m_bitmap.pix16(y + yoff, 0 + xoff) = color[code >> 7];
|
||||
m_bitmap.pix16(y + yoff, 1 + xoff) = color[(code >> 6) & 1];
|
||||
m_bitmap.pix16(y + yoff, 2 + xoff) = color[(code >> 5) & 1];
|
||||
@ -505,6 +507,8 @@ void mos7360_device::draw_character_multi(int ybegin, int yend, int ch, int yoff
|
||||
else
|
||||
code = m_in_ram_func(m_chargenaddr + ch * 8 + y);
|
||||
|
||||
m_last_data = code;
|
||||
|
||||
m_bitmap.pix16(y + yoff, 0 + xoff) =
|
||||
m_bitmap.pix16(y + yoff, 1 + xoff) = m_multi[code >> 6];
|
||||
m_bitmap.pix16(y + yoff, 2 + xoff) =
|
||||
@ -523,6 +527,9 @@ void mos7360_device::draw_bitmap(int ybegin, int yend, int ch, int yoff, int xof
|
||||
for (y = ybegin; y <= yend; y++)
|
||||
{
|
||||
code = m_in_ram_func(m_bitmapaddr + ch * 8 + y);
|
||||
|
||||
m_last_data = code;
|
||||
|
||||
m_bitmap.pix16(y + yoff, 0 + xoff) = m_c16_bitmap[code >> 7];
|
||||
m_bitmap.pix16(y + yoff, 1 + xoff) = m_c16_bitmap[(code >> 6) & 1];
|
||||
m_bitmap.pix16(y + yoff, 2 + xoff) = m_c16_bitmap[(code >> 5) & 1];
|
||||
@ -541,6 +548,8 @@ void mos7360_device::draw_bitmap_multi(int ybegin, int yend, int ch, int yoff, i
|
||||
for (y = ybegin; y <= yend; y++)
|
||||
{
|
||||
code = m_in_ram_func(m_bitmapaddr + ch * 8 + y);
|
||||
|
||||
m_last_data = code;
|
||||
|
||||
m_bitmap.pix16(y + yoff, 0 + xoff) =
|
||||
m_bitmap.pix16(y + yoff, 1 + xoff) = m_bitmapmulti[code >> 6];
|
||||
@ -1141,3 +1150,13 @@ void mos7360_device::raster_interrupt_gen()
|
||||
set_interrupt(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// bus_r - data bus read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 mos7360_device::bus_r()
|
||||
{
|
||||
return m_last_data;
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ public:
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
UINT8 bus_r();
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
// horrible crap code
|
||||
@ -171,6 +173,7 @@ protected:
|
||||
sound_stream *m_stream;
|
||||
|
||||
UINT8 m_reg[0x20];
|
||||
UINT8 m_last_data;
|
||||
|
||||
bitmap_ind16 m_bitmap;
|
||||
|
||||
|
@ -642,9 +642,24 @@ GFXDECODE_END
|
||||
*************************************/
|
||||
|
||||
|
||||
READ8_MEMBER( c128_state::sid_potx_r )
|
||||
{
|
||||
device_t *sid = machine().device("sid6581");
|
||||
|
||||
return c64_paddle_read(sid, 0);
|
||||
}
|
||||
|
||||
READ8_MEMBER( c128_state::sid_poty_r )
|
||||
{
|
||||
device_t *sid = machine().device("sid6581");
|
||||
|
||||
return c64_paddle_read(sid, 1);
|
||||
}
|
||||
|
||||
static const sid6581_interface c128_sound_interface =
|
||||
{
|
||||
c64_paddle_read
|
||||
DEVCB_DRIVER_MEMBER(c128_state, sid_potx_r),
|
||||
DEVCB_DRIVER_MEMBER(c128_state, sid_poty_r)
|
||||
};
|
||||
|
||||
|
||||
@ -656,14 +671,6 @@ static const m6502_interface c128_m8502_interface =
|
||||
DEVCB_HANDLER(c128_m6510_port_write) /* port_write_func */
|
||||
};
|
||||
|
||||
static SLOT_INTERFACE_START( c128dcr_iec_devices )
|
||||
SLOT_INTERFACE("c1571cr", C1571CR)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static SLOT_INTERFACE_START( c128d81_iec_devices )
|
||||
SLOT_INTERFACE("c1563", C1563)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static CBM_IEC_INTERFACE( cbm_iec_intf )
|
||||
{
|
||||
DEVCB_DEVICE_LINE("cia_0", c128_iec_srq_w),
|
||||
|
@ -50,10 +50,10 @@ void c64_state::check_interrupts()
|
||||
{
|
||||
int restore = BIT(ioport("SPECIAL")->read(), 7);
|
||||
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_cia1_irq | m_vic_irq | m_exp_irq);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, m_cia2_irq | restore | m_exp_nmi);
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_cia1_irq || m_vic_irq || m_exp_irq);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, m_cia2_irq || restore || m_exp_nmi);
|
||||
|
||||
mos6526_flag_w(m_cia1, m_cass_rd & m_iec_srq);
|
||||
mos6526_flag_w(m_cia1, m_cass_rd && m_iec_srq);
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ UINT8 c64_state::read_memory(address_space &space, offs_t offset, int ba, int ca
|
||||
{
|
||||
int io1 = 1, io2 = 1;
|
||||
|
||||
UINT8 data = 0;
|
||||
UINT8 data = m_vic->bus_r();
|
||||
|
||||
if (!casram)
|
||||
{
|
||||
@ -155,9 +155,7 @@ UINT8 c64_state::read_memory(address_space &space, offs_t offset, int ba, int ca
|
||||
}
|
||||
}
|
||||
|
||||
data |= m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
|
||||
|
||||
return data;
|
||||
return m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
|
||||
}
|
||||
|
||||
|
||||
@ -249,7 +247,7 @@ READ8_MEMBER( c64_state::vic_videoram_r )
|
||||
int casram, basic, kernal, charom, grw, io, roml, romh;
|
||||
bankswitch(0xffff, offset, rw, aec, ba, cas, &casram, &basic, &kernal, &charom, &grw, &io, &roml, &romh);
|
||||
|
||||
return read_memory(space, offset, 0, casram, basic, kernal, charom, io, roml, romh);
|
||||
return read_memory(space, offset, ba, casram, basic, kernal, charom, io, roml, romh);
|
||||
}
|
||||
|
||||
|
||||
@ -437,125 +435,40 @@ static MOS6567_INTERFACE( vic_intf )
|
||||
// sid6581_interface sid_intf
|
||||
//-------------------------------------------------
|
||||
|
||||
static int paddle_read( device_t *device, int which )
|
||||
READ8_MEMBER( c64_state::sid_potx_r )
|
||||
{
|
||||
running_machine &machine = device->machine();
|
||||
c64_state *state = device->machine().driver_data<c64_state>();
|
||||
UINT8 cia1_pa = mos6526_pa_r(m_cia1, 0);
|
||||
|
||||
int sela = BIT(cia1_pa, 6);
|
||||
int selb = BIT(cia1_pa, 7);
|
||||
|
||||
int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
|
||||
UINT8 cia0porta = mos6526_pa_r(state->m_cia1, 0);
|
||||
int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07;
|
||||
int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70;
|
||||
// Notice that only a single input is defined for Mouse & Lightpen in both ports
|
||||
switch (controller1)
|
||||
{
|
||||
case 0x01:
|
||||
if (which)
|
||||
pot2 = machine.root_device().ioport("PADDLE2")->read();
|
||||
else
|
||||
pot1 = machine.root_device().ioport("PADDLE1")->read();
|
||||
break;
|
||||
UINT8 data = 0;
|
||||
|
||||
case 0x02:
|
||||
if (which)
|
||||
pot2 = machine.root_device().ioport("TRACKY")->read();
|
||||
else
|
||||
pot1 = machine.root_device().ioport("TRACKX")->read();
|
||||
break;
|
||||
if (sela) data = m_joy1->pot_x_r();
|
||||
if (selb) data = m_joy2->pot_x_r();
|
||||
|
||||
case 0x03:
|
||||
if (which && (machine.root_device().ioport("JOY1_2B")->read() & 0x20)) // Joy1 Button 2
|
||||
pot1 = 0x00;
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
if (which)
|
||||
pot2 = machine.root_device().ioport("LIGHTY")->read();
|
||||
else
|
||||
pot1 = machine.root_device().ioport("LIGHTX")->read();
|
||||
break;
|
||||
|
||||
case 0x06:
|
||||
if (which && (machine.root_device().ioport("OTHER")->read() & 0x04)) // Lightpen Signal
|
||||
pot2 = 0x00;
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
case 0x07:
|
||||
break;
|
||||
|
||||
default:
|
||||
logerror("Invalid Controller Setting %d\n", controller1);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (controller2)
|
||||
{
|
||||
case 0x10:
|
||||
if (which)
|
||||
pot4 = machine.root_device().ioport("PADDLE4")->read();
|
||||
else
|
||||
pot3 = machine.root_device().ioport("PADDLE3")->read();
|
||||
break;
|
||||
|
||||
case 0x20:
|
||||
if (which)
|
||||
pot4 = machine.root_device().ioport("TRACKY")->read();
|
||||
else
|
||||
pot3 = machine.root_device().ioport("TRACKX")->read();
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
if (which && (machine.root_device().ioport("JOY2_2B")->read() & 0x20)) // Joy2 Button 2
|
||||
pot4 = 0x00;
|
||||
break;
|
||||
|
||||
case 0x40:
|
||||
if (which)
|
||||
pot4 = machine.root_device().ioport("LIGHTY")->read();
|
||||
else
|
||||
pot3 = machine.root_device().ioport("LIGHTX")->read();
|
||||
break;
|
||||
|
||||
case 0x60:
|
||||
if (which && (machine.root_device().ioport("OTHER")->read() & 0x04)) // Lightpen Signal
|
||||
pot4 = 0x00;
|
||||
break;
|
||||
|
||||
case 0x00:
|
||||
case 0x70:
|
||||
break;
|
||||
|
||||
default:
|
||||
logerror("Invalid Controller Setting %d\n", controller1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (machine.root_device().ioport("CTRLSEL")->read() & 0x80) // Swap
|
||||
{
|
||||
temp = pot1; pot1 = pot3; pot3 = temp;
|
||||
temp = pot2; pot2 = pot4; pot4 = temp;
|
||||
}
|
||||
|
||||
switch (cia0porta & 0xc0)
|
||||
{
|
||||
case 0x40:
|
||||
return which ? pot2 : pot1;
|
||||
|
||||
case 0x80:
|
||||
return which ? pot4 : pot3;
|
||||
|
||||
case 0xc0:
|
||||
return which ? pot2 : pot1;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
static const sid6581_interface sid_intf =
|
||||
READ8_MEMBER( c64_state::sid_poty_r )
|
||||
{
|
||||
paddle_read
|
||||
UINT8 cia1_pa = mos6526_pa_r(m_cia1, 0);
|
||||
|
||||
int sela = BIT(cia1_pa, 6);
|
||||
int selb = BIT(cia1_pa, 7);
|
||||
|
||||
UINT8 data = 0;
|
||||
|
||||
if (sela) data = m_joy1->pot_y_r();
|
||||
if (selb) data = m_joy2->pot_y_r();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static MOS6581_INTERFACE( sid_intf )
|
||||
{
|
||||
DEVCB_DRIVER_MEMBER(c64_state, sid_potx_r),
|
||||
DEVCB_DRIVER_MEMBER(c64_state, sid_poty_r)
|
||||
};
|
||||
|
||||
|
||||
@ -753,7 +666,7 @@ READ8_MEMBER( c64_state::cpu_r )
|
||||
|
||||
UINT8 data = 0x07;
|
||||
|
||||
data |= ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED) << 4;
|
||||
data |= m_cassette->sense_r() << 4;
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -781,19 +694,10 @@ WRITE8_MEMBER( c64_state::cpu_w )
|
||||
m_charen = BIT(data, 2);
|
||||
|
||||
// cassette write
|
||||
m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
|
||||
m_cassette->write(BIT(data, 3));
|
||||
|
||||
// cassette motor
|
||||
if (!BIT(data, 5))
|
||||
{
|
||||
m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
|
||||
m_cassette_timer->adjust(attotime::zero, 0, attotime::from_hz(44100));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
|
||||
m_cassette_timer->reset();
|
||||
}
|
||||
m_cassette->motor_w(BIT(data, 5));
|
||||
}
|
||||
|
||||
static const m6502_interface cpu_intf =
|
||||
@ -914,18 +818,21 @@ static const m6502_interface c64gs_cpu_intf =
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// TIMER_DEVICE_CALLBACK( cassette_tick )
|
||||
// PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
|
||||
//-------------------------------------------------
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( cassette_tick )
|
||||
WRITE_LINE_MEMBER( c64_state::tape_read_w )
|
||||
{
|
||||
c64_state *state = timer.machine().driver_data<c64_state>();
|
||||
m_cass_rd = state;
|
||||
|
||||
state->m_cass_rd = state->m_cassette->input() > +0.0;
|
||||
|
||||
state->check_interrupts();
|
||||
check_interrupts();
|
||||
}
|
||||
|
||||
static PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(c64_state, tape_read_w),
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// CBM_IEC_INTERFACE( iec_intf )
|
||||
@ -1115,8 +1022,7 @@ static MACHINE_CONFIG_START( ntsc, c64_state )
|
||||
MCFG_MOS6526R1_ADD(MOS6526_1_TAG, VIC6567_CLOCK, cia1_intf)
|
||||
MCFG_MOS6526R1_ADD(MOS6526_2_TAG, VIC6567_CLOCK, cia2_intf)
|
||||
MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface)
|
||||
MCFG_TIMER_ADD(TIMER_C1531_TAG, cassette_tick)
|
||||
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
|
||||
MCFG_CBM_IEC_ADD(iec_intf, "c1541")
|
||||
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
|
||||
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vic20_control_port_devices, NULL, NULL)
|
||||
@ -1212,8 +1118,7 @@ static MACHINE_CONFIG_START( pal, c64_state )
|
||||
MCFG_MOS6526R1_ADD(MOS6526_1_TAG, VIC6569_CLOCK, cia1_intf)
|
||||
MCFG_MOS6526R1_ADD(MOS6526_2_TAG, VIC6569_CLOCK, cia2_intf)
|
||||
MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface)
|
||||
MCFG_TIMER_ADD(TIMER_C1531_TAG, cassette_tick)
|
||||
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
|
||||
MCFG_CBM_IEC_ADD(iec_intf, "c1541")
|
||||
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
|
||||
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vic20_control_port_devices, NULL, NULL)
|
||||
|
@ -189,9 +189,24 @@ static PALETTE_INIT( c65 )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const sid6581_interface c65_sound_interface =
|
||||
READ8_MEMBER( c65_state::sid_potx_r )
|
||||
{
|
||||
c64_paddle_read
|
||||
device_t *sid = machine().device("sid_r");
|
||||
|
||||
return c64_paddle_read(sid, 0);
|
||||
}
|
||||
|
||||
READ8_MEMBER( c65_state::sid_poty_r )
|
||||
{
|
||||
device_t *sid = machine().device("sid_r");
|
||||
|
||||
return c64_paddle_read(sid, 1);
|
||||
}
|
||||
|
||||
static MOS6581_INTERFACE( c65_sound_interface )
|
||||
{
|
||||
DEVCB_DRIVER_MEMBER(c65_state, sid_potx_r),
|
||||
DEVCB_DRIVER_MEMBER(c65_state, sid_poty_r)
|
||||
};
|
||||
|
||||
|
||||
|
@ -188,14 +188,6 @@ static ADDRESS_MAP_START( compis_io, AS_IO, 16, compis_state )
|
||||
//{ 0xff20, 0xffff, compis_null_r }, /* CPU 80186 */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/* TODO */
|
||||
static ADDRESS_MAP_START( keyboard_io, AS_IO, 8, compis_state )
|
||||
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_NOP
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/* COMPIS Keyboard */
|
||||
|
||||
/* 2008-05 FP:
|
||||
@ -369,9 +361,6 @@ static MACHINE_CONFIG_START( compis, compis_state )
|
||||
MCFG_CPU_VBLANK_INT("screen", compis_vblank_int)
|
||||
MCFG_CPU_CONFIG(i86_address_mask)
|
||||
|
||||
MCFG_CPU_ADD("i8749", I8749, 1000000)
|
||||
MCFG_CPU_IO_MAP(keyboard_io)
|
||||
|
||||
//MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
MCFG_MACHINE_START(compis)
|
||||
@ -404,6 +393,7 @@ static MACHINE_CONFIG_START( compis, compis_state )
|
||||
MCFG_MM58274C_ADD("mm58274c", compis_mm58274c_interface)
|
||||
MCFG_UPD765A_ADD("upd765", compis_fdc_interface)
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(compis_floppy_interface)
|
||||
MCFG_COMPIS_KEYBOARD_ADD()
|
||||
|
||||
/* software lists */
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list", "compis")
|
||||
@ -417,9 +407,6 @@ static MACHINE_CONFIG_START( compis2, compis_state )
|
||||
MCFG_CPU_VBLANK_INT("screen", compis_vblank_int)
|
||||
MCFG_CPU_CONFIG(i86_address_mask)
|
||||
|
||||
MCFG_CPU_ADD("i8749", I8749, 1000000)
|
||||
MCFG_CPU_IO_MAP(keyboard_io)
|
||||
|
||||
//MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
MCFG_MACHINE_START(compis)
|
||||
@ -448,6 +435,7 @@ static MACHINE_CONFIG_START( compis2, compis_state )
|
||||
MCFG_MM58274C_ADD("mm58274c", compis_mm58274c_interface)
|
||||
MCFG_UPD765A_ADD("upd765", compis_fdc_interface)
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(compis_floppy_interface)
|
||||
MCFG_COMPIS_KEYBOARD_ADD()
|
||||
|
||||
/* software lists */
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list", "compis")
|
||||
@ -467,9 +455,6 @@ ROM_START( compis )
|
||||
ROM_LOAD16_BYTE( "sa883003.u36", 0x0001, 0x4000, CRC(7c918f56) SHA1(8ba33d206351c52f44f1aa76cc4d7f292dcef761) )
|
||||
ROM_LOAD16_BYTE( "sa883003.u39", 0x8000, 0x4000, CRC(3cca66db) SHA1(cac36c9caa2f5bb42d7a6d5b84f419318628935f) )
|
||||
ROM_LOAD16_BYTE( "sa883003.u35", 0x8001, 0x4000, CRC(43c38e76) SHA1(f32e43604107def2c2259898926d090f2ed62104) )
|
||||
|
||||
ROM_REGION( 0x800, "i8749", 0 )
|
||||
ROM_LOAD( "cmpkey13.u1", 0x0000, 0x0800, CRC(3f87d138) SHA1(c04e2d325b9c04818bc7c47c3bf32b13862b11ec) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( compis2 )
|
||||
@ -483,9 +468,6 @@ ROM_START( compis2 )
|
||||
ROM_SYSTEM_BIOS( 1, "v303", "Compis II v3.03 (1987-03-09)" )
|
||||
ROMX_LOAD( "rysa094.u39", 0x0000, 0x8000, CRC(e7302bff) SHA1(44ea20ef4008849af036c1a945bc4f27431048fb), ROM_BIOS(2) | ROM_SKIP(1) )
|
||||
ROMX_LOAD( "rysa094.u35", 0x0001, 0x8000, CRC(b0694026) SHA1(eb6b2e3cb0f42fd5ffdf44f70e652ecb9714ce30), ROM_BIOS(2) | ROM_SKIP(1) )
|
||||
|
||||
ROM_REGION( 0x800, "i8749", 0 )
|
||||
ROM_LOAD( "cmpkey13.u1", 0x0000, 0x0800, CRC(3f87d138) SHA1(c04e2d325b9c04818bc7c47c3bf32b13862b11ec) )
|
||||
ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
|
||||
|
@ -18,14 +18,6 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "machine/z80pio.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/ram.h"
|
||||
#include "includes/huebler.h"
|
||||
|
||||
/* Keyboard */
|
||||
@ -41,8 +33,8 @@ void amu880_state::scan_keyboard()
|
||||
if (m_key_a8 && !a8)
|
||||
{
|
||||
m_key_d7 = m_key_d6;
|
||||
m_key_a4 = !(BIT(data, 1) & BIT(data, 3));
|
||||
m_key_a5 = !(BIT(data, 2) & BIT(data, 3));
|
||||
m_key_a4 = !(BIT(data, 1) && BIT(data, 3));
|
||||
m_key_a5 = !(BIT(data, 2) && BIT(data, 3));
|
||||
}
|
||||
|
||||
m_key_a8 = a8;
|
||||
|
@ -2,14 +2,13 @@
|
||||
|
||||
TODO:
|
||||
|
||||
- cassette
|
||||
- cassette motor is turned on only for a moment while LOADing
|
||||
- c16 function ROM test fails
|
||||
- c1551 won't load anything
|
||||
- clean up keyboard handling
|
||||
- clean up TED
|
||||
- dump PLA
|
||||
- T6721 speech chip
|
||||
- floating bus read (should return the previous byte read by TED)
|
||||
- SID card (http://solder.dyndns.info/cgi-bin/showdir.pl?dir=files/commodore/plus4/hardware/SID-Card)
|
||||
|
||||
*/
|
||||
|
||||
@ -167,7 +166,7 @@ void plus4_state::bankswitch(offs_t offset, int phi0, int mux, int ras, int *scs
|
||||
|
||||
UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal, int cs0, int cs1)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
UINT8 data = m_ted->bus_r();
|
||||
int c1l = 1, c1h = 1, c2l = 1, c2h = 1;
|
||||
|
||||
//logerror("offset %04x user %u 6551 %u addr_clk %u keyport %u kernal %u cs0 %u cs1 %u m_rom_en %u\n", offset,user,_6551,addr_clk,keyport,kernal,cs0,cs1,m_rom_en);
|
||||
@ -182,10 +181,9 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
|
||||
{
|
||||
data = m_spi_user->read(space, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
data |= ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED) << 2;
|
||||
}
|
||||
|
||||
data &= ~0x04;
|
||||
data |= m_cassette->sense_r() << 2;
|
||||
}
|
||||
else if (!_6551 && m_acia)
|
||||
{
|
||||
@ -216,6 +214,11 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
|
||||
|
||||
case CS0_C2_LOW:
|
||||
c2l = 0;
|
||||
|
||||
if (m_c2 != NULL)
|
||||
{
|
||||
data = m_c2[offset & 0x7fff];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -246,6 +249,11 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
|
||||
|
||||
case CS1_C2_HIGH:
|
||||
c2h = 0;
|
||||
|
||||
if (m_c2 != NULL)
|
||||
{
|
||||
data = m_c2[offset & 0x7fff];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -259,9 +267,7 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
|
||||
data = m_ram->pointer()[offset & m_ram->mask()];
|
||||
}
|
||||
|
||||
data |= m_exp->cd_r(space, offset, ba, cs0, c1l, c1h, cs1, c2l, c2h);
|
||||
|
||||
return data;
|
||||
return m_exp->cd_r(space, offset, data, ba, cs0, c1l, c1h, cs1, c2l, c2h);
|
||||
}
|
||||
|
||||
|
||||
@ -448,23 +454,20 @@ READ8_MEMBER( plus4_state::cpu_r )
|
||||
4 CST RD
|
||||
5
|
||||
6 IEC CLK IN
|
||||
7 IEC DATA IN, CST SENSE (Plus/4)
|
||||
7 IEC DATA IN, CST SENSE
|
||||
|
||||
*/
|
||||
|
||||
UINT8 data = 0xff;
|
||||
UINT8 c16_port7501 = m6510_get_port(m_maincpu);
|
||||
UINT8 data = 0x2f;
|
||||
|
||||
if (BIT(c16_port7501, 0) || !m_iec->data_r() || ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED))
|
||||
data &= ~0x80;
|
||||
// cassette read
|
||||
data |= m_cassette->read() << 4;
|
||||
|
||||
if (BIT(c16_port7501, 1) || !m_iec->clk_r())
|
||||
data &= ~0x40;
|
||||
// serial clock
|
||||
data |= m_iec->clk_r() << 6;
|
||||
|
||||
if (m_cassette->input() > +0.0)
|
||||
data |= 0x10;
|
||||
else
|
||||
data &= ~0x10;
|
||||
// serial data, cassette sense
|
||||
data |= (m_iec->data_r() && m_cassette->sense_r()) << 7;
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -486,19 +489,16 @@ READ8_MEMBER( plus4_state::c16_cpu_r )
|
||||
|
||||
*/
|
||||
|
||||
UINT8 data = 0xff;
|
||||
UINT8 c16_port7501 = m6510_get_port(m_maincpu);
|
||||
UINT8 data = 0x2f;
|
||||
|
||||
if (BIT(c16_port7501, 0) || !m_iec->data_r())
|
||||
data &= ~0x80;
|
||||
// cassette read
|
||||
data |= m_cassette->read() << 4;
|
||||
|
||||
if (BIT(c16_port7501, 1) || !m_iec->clk_r())
|
||||
data &= ~0x40;
|
||||
// serial clock
|
||||
data |= m_iec->clk_r() << 6;
|
||||
|
||||
if (m_cassette->input() > +0.0)
|
||||
data |= 0x10;
|
||||
else
|
||||
data &= ~0x10;
|
||||
// serial data
|
||||
data |= m_iec->data_r() << 7;
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -515,21 +515,27 @@ WRITE8_MEMBER( plus4_state::cpu_w )
|
||||
3 CST MTR
|
||||
4
|
||||
5
|
||||
6
|
||||
6 (CST WR)
|
||||
7
|
||||
|
||||
*/
|
||||
|
||||
// serial bus
|
||||
//logerror("%s cpu write %02x\n", machine().describe_context(), data);
|
||||
|
||||
// serial data
|
||||
m_iec->data_w(!BIT(data, 0));
|
||||
|
||||
// serial clock
|
||||
m_iec->clk_w(!BIT(data, 1));
|
||||
|
||||
// serial attention
|
||||
m_iec->atn_w(!BIT(data, 2));
|
||||
|
||||
// cassette write
|
||||
m_cassette->output(!BIT(data, 1) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
|
||||
|
||||
// cassette motor
|
||||
m_cassette->change_state(BIT(data, 3) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
|
||||
m_cassette->motor_w(BIT(data, 3));
|
||||
|
||||
// cassette write
|
||||
m_cassette->write(!BIT(data, 1));
|
||||
}
|
||||
|
||||
static const m6502_interface cpu_intf =
|
||||
@ -630,21 +636,21 @@ WRITE_LINE_MEMBER( plus4_state::ted_irq_w )
|
||||
READ8_MEMBER( plus4_state::ted_ram_r )
|
||||
{
|
||||
int phi0 = 1, mux = 0, ras = 1, ba = 0;
|
||||
int speech, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
|
||||
int scs, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
|
||||
|
||||
bankswitch(offset, phi0, mux, ras, &speech, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
|
||||
bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
|
||||
|
||||
return read_memory(space, offset, ba, speech, phi2, user, _6551, addr_clk, keyport, kernal, 1, 1);
|
||||
return read_memory(space, offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal, 1, 1);
|
||||
}
|
||||
|
||||
READ8_MEMBER( plus4_state::ted_rom_r )
|
||||
{
|
||||
int phi0 = 1, mux = 0, ras = 1, ba = 0;
|
||||
int speech, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
|
||||
int scs, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
|
||||
|
||||
bankswitch(offset, phi0, mux, ras, &speech, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
|
||||
bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
|
||||
|
||||
return read_memory(space, offset, ba, speech, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1);
|
||||
return read_memory(space, offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1);
|
||||
}
|
||||
|
||||
READ8_MEMBER( plus4_state::ted_k_r )
|
||||
@ -766,6 +772,16 @@ static MOS6529_INTERFACE( spi_kb_intf )
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
|
||||
//-------------------------------------------------
|
||||
|
||||
static PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
|
||||
{
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// CBM_IEC_INTERFACE( iec_intf )
|
||||
//-------------------------------------------------
|
||||
@ -845,6 +861,11 @@ void plus4_state::machine_start()
|
||||
m_function = memregion("function")->base();
|
||||
}
|
||||
|
||||
if (memregion("c2") != NULL)
|
||||
{
|
||||
m_c2 = memregion("c2")->base();
|
||||
}
|
||||
|
||||
// state saving
|
||||
save_item(NAME(m_addr));
|
||||
save_item(NAME(m_rom_en));
|
||||
@ -915,7 +936,7 @@ static MACHINE_CONFIG_START( ntsc, plus4_state )
|
||||
MCFG_MOS6529_ADD(MOS6529_USER_TAG, spi_user_intf)
|
||||
MCFG_MOS6529_ADD(MOS6529_KB_TAG, spi_kb_intf)
|
||||
MCFG_QUICKLOAD_ADD("quickload", cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
MCFG_CASSETTE_ADD( CASSETTE_TAG, cbm_cassette_interface )
|
||||
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, plus4_datassette_devices, "c1531", NULL)
|
||||
MCFG_CBM_IEC_ADD(iec_intf, NULL)
|
||||
MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, expansion_intf, plus4_expansion_cards, NULL, NULL)
|
||||
MCFG_PLUS4_USER_PORT_ADD(PLUS4_USER_PORT_TAG, plus4_user_port_cards, NULL, NULL)
|
||||
@ -954,7 +975,7 @@ static MACHINE_CONFIG_START( pal, plus4_state )
|
||||
MCFG_MOS6529_ADD(MOS6529_USER_TAG, spi_user_intf)
|
||||
MCFG_MOS6529_ADD(MOS6529_KB_TAG, spi_kb_intf)
|
||||
MCFG_QUICKLOAD_ADD("quickload", cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
MCFG_CASSETTE_ADD( CASSETTE_TAG, cbm_cassette_interface )
|
||||
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, plus4_datassette_devices, "c1531", NULL)
|
||||
MCFG_CBM_IEC_ADD(iec_intf, NULL)
|
||||
MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_17_73447MHz/20, expansion_intf, plus4_expansion_cards, NULL, NULL)
|
||||
MCFG_PLUS4_USER_PORT_ADD(PLUS4_USER_PORT_TAG, plus4_user_port_cards, NULL, NULL)
|
||||
@ -970,10 +991,31 @@ MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG( c16 )
|
||||
// MACHINE_CONFIG( c16n )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( c16, pal )
|
||||
static MACHINE_CONFIG_DERIVED( c16n, ntsc )
|
||||
MCFG_CPU_MODIFY(MOS7501_TAG)
|
||||
MCFG_CPU_CONFIG(c16_cpu_intf)
|
||||
|
||||
MCFG_DEVICE_REMOVE(MOS6551_TAG)
|
||||
MCFG_DEVICE_REMOVE(MOS6529_USER_TAG)
|
||||
MCFG_DEVICE_REMOVE(PLUS4_USER_PORT_TAG)
|
||||
|
||||
MCFG_DEVICE_MODIFY(CBM_IEC_TAG)
|
||||
MCFG_DEVICE_CONFIG(c16_iec_intf)
|
||||
|
||||
MCFG_DEVICE_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("16K")
|
||||
MCFG_RAM_EXTRA_OPTIONS("64K")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG( c16p )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( c16p, pal )
|
||||
MCFG_CPU_MODIFY(MOS7501_TAG)
|
||||
MCFG_CPU_CONFIG(c16_cpu_intf)
|
||||
|
||||
@ -994,7 +1036,7 @@ MACHINE_CONFIG_END
|
||||
// MACHINE_CONFIG( c232 )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( c232, c16 )
|
||||
static MACHINE_CONFIG_DERIVED( c232, c16p )
|
||||
MCFG_DEVICE_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("32K")
|
||||
MACHINE_CONFIG_END
|
||||
@ -1024,7 +1066,48 @@ ROM_START( c264 )
|
||||
ROM_LOAD( "basic-264.bin", 0x0000, 0x4000, CRC(6a2fc8e3) SHA1(473fce23afa07000cdca899fbcffd6961b36a8a0) )
|
||||
ROM_LOAD( "kernal-264.bin", 0x4000, 0x4000, CRC(8f32abe7) SHA1(d481faf5fcbb331878dc7851c642d04f26a32873) )
|
||||
|
||||
ROM_REGION( 0x8000, "function", ROMREGION_ERASE00 )
|
||||
ROM_REGION( 0x8000, "function", 0 )
|
||||
ROM_CART_LOAD( "lo", 0x0000, 0x0000, ROM_NOMIRROR )
|
||||
ROM_CART_LOAD( "hi", 0x4000, 0x0000, ROM_NOMIRROR )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c232 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( c232 )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01.u4", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
ROM_LOAD( "318004-01.u5", 0x4000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201) )
|
||||
|
||||
ROM_REGION( 0x8000, "function", 0 )
|
||||
ROM_CART_LOAD( "lo", 0x0000, 0x0000, ROM_NOMIRROR )
|
||||
ROM_CART_LOAD( "hi", 0x4000, 0x0000, ROM_NOMIRROR )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02.u7", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( v364 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( v364 )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
ROM_LOAD( "kern364p", 0x4000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f) )
|
||||
|
||||
ROM_REGION( 0x8000, "function", 0 )
|
||||
ROM_LOAD( "317053-01", 0x0000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) )
|
||||
ROM_LOAD( "317054-01", 0x4000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) )
|
||||
|
||||
ROM_REGION( 0x8000, "c2", 0 )
|
||||
ROM_LOAD( "spk3cc4.bin", 0x0000, 0x4000, CRC(5227c2ee) SHA1(59af401cbb2194f689898271c6e8aafa28a7af11) )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02", 0x00, 0xf5, NO_DUMP )
|
||||
@ -1082,10 +1165,31 @@ ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c16 )
|
||||
// ROM( c16n )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( c16 )
|
||||
ROM_START( c16n )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_DEFAULT_BIOS("r5")
|
||||
ROM_SYSTEM_BIOS( 0, "r4", "Revision 4" )
|
||||
ROMX_LOAD( "318005-04.u24", 0x4000, 0x4000, CRC(799a633d) SHA1(5df52c693387c0e2b5d682613a3b5a65477311cf), ROM_BIOS(1) )
|
||||
ROM_SYSTEM_BIOS( 1, "r5", "Revision 5" )
|
||||
ROMX_LOAD( "318005-05.u24", 0x4000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(2) )
|
||||
ROM_SYSTEM_BIOS( 2, "jiffydos", "JiffyDOS v6.01" )
|
||||
ROMX_LOAD( "jiffydos plus4.u24", 0x0000, 0x8000, CRC(818d3f45) SHA1(9bc1b1c3da9ca642deae717905f990d8e36e6c3b), ROM_BIOS(3) ) // first half contains R5 kernal
|
||||
|
||||
ROM_LOAD( "318006-01.u23", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02.u19", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c16p )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( c16p )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01.u3", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
|
||||
@ -1102,6 +1206,25 @@ ROM_START( c16 )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c16h )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( c16h )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01.u3", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
|
||||
ROM_DEFAULT_BIOS("r2")
|
||||
ROM_SYSTEM_BIOS( 0, "r1", "Revision 1" )
|
||||
ROMX_LOAD( "318030-01.u4", 0x4000, 0x4000, NO_DUMP, ROM_BIOS(1) )
|
||||
ROM_SYSTEM_BIOS( 1, "r2", "Revision 2" )
|
||||
ROMX_LOAD( "318030-02.u4", 0x4000, 0x4000, CRC(775f60c5) SHA1(20cf3c4bf6c54ef09799af41887218933f2e27ee), ROM_BIOS(2) )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02.u16", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c116 )
|
||||
//-------------------------------------------------
|
||||
@ -1123,71 +1246,18 @@ ROM_START( c116 )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c16h )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( c16h )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01.u3", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
|
||||
ROM_DEFAULT_BIOS("r2")
|
||||
ROM_SYSTEM_BIOS( 0, "r1", "Revision 1" )
|
||||
ROMX_LOAD( "318030-01.u4", 0x4000, 0x4000, NO_DUMP, ROM_BIOS(1) )
|
||||
ROM_SYSTEM_BIOS( 1, "r2", "Revision 2" )
|
||||
ROMX_LOAD( "318030-02.u4", 0x4000, 0x4000, CRC(775f60c5) SHA1(20cf3c4bf6c54ef09799af41887218933f2e27ee), ROM_BIOS(2) )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02.u16", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( c232 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( c232 )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01.u4", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
ROM_LOAD( "318004-01.u5", 0x4000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201) )
|
||||
|
||||
ROM_REGION( 0x8000, "function", ROMREGION_ERASE00 )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02.u7", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( v364 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( v364 )
|
||||
ROM_REGION( 0x8000, "kernal", 0 )
|
||||
ROM_LOAD( "318006-01", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
|
||||
ROM_LOAD( "kern364p", 0x4000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f) )
|
||||
|
||||
ROM_REGION( 0x10000, "function", 0 )
|
||||
ROM_LOAD( "317053-01", 0x0000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) )
|
||||
ROM_LOAD( "317054-01", 0x4000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) )
|
||||
ROM_LOAD( "spk3cc4.bin", 0x8000, 0x4000, CRC(5227c2ee) SHA1(59af401cbb2194f689898271c6e8aafa28a7af11) )
|
||||
|
||||
ROM_REGION( 0xf5, PLA_TAG, 0 )
|
||||
ROM_LOAD( "251641-02", 0x00, 0xf5, NO_DUMP )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SYSTEM DRIVERS
|
||||
//**************************************************************************
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1983, c264, 0, 0, ntsc, plus4, driver_device, 0, "Commodore Business Machines", "Commodore 264 (Prototype)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c264, 0, 0, ntsc, plus4, driver_device, 0, "Commodore Business Machines", "Commodore 264 (Prototype)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c232, c264, 0, c232, plus4, driver_device, 0, "Commodore Business Machines", "Commodore 232 (Prototype)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, v364, c264, 0, v364, plus4, driver_device, 0, "Commodore Business Machines", "Commodore V364 (Prototype)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, plus4n, c264, 0, ntsc, plus4, driver_device, 0, "Commodore Business Machines", "Plus/4 (NTSC)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, plus4p, c264, 0, pal, plus4, driver_device, 0, "Commodore Business Machines", "Plus/4 (PAL)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c16, c264, 0, c16, c16, driver_device, 0, "Commodore Business Machines", "Commodore 16", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c16h, c264, 0, c16, c16, driver_device, 0, "Commodore Business Machines", "Commodore 16 (Hungary)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c116, c264, 0, c16, c16, driver_device, 0, "Commodore Business Machines", "Commodore 116", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c232, c264, 0, c232, plus4, driver_device, 0, "Commodore Business Machines", "Commodore 232 (Prototype)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1985, v364, c264, 0, v364, plus4, driver_device, 0, "Commodore Business Machines", "Commodore V364 (Prototype)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c16n, c264, 0, c16n, c16, driver_device, 0, "Commodore Business Machines", "Commodore 16 (NTSC)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c16p, c264, 0, c16p, c16, driver_device, 0, "Commodore Business Machines", "Commodore 16 (PAL)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c16h, c264, 0, c16p, c16, driver_device, 0, "Commodore Business Machines", "Commodore 16 (Hungary)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, c116, c264, 0, c16p, c16, driver_device, 0, "Commodore Business Machines", "Commodore 116", GAME_SUPPORTS_SAVE )
|
||||
|
@ -39,7 +39,7 @@ READ8_MEMBER( vic10_state::read )
|
||||
{
|
||||
// TODO this is really handled by the PLA
|
||||
|
||||
UINT8 data = 0;
|
||||
UINT8 data = m_vic->bus_r();
|
||||
int lorom = 1, uprom = 1, exram = 1;
|
||||
|
||||
if (offset < 0x800)
|
||||
@ -75,9 +75,7 @@ READ8_MEMBER( vic10_state::read )
|
||||
uprom = 0;
|
||||
}
|
||||
|
||||
data |= m_exp->cd_r(space, offset, lorom, uprom, exram);
|
||||
|
||||
return data;
|
||||
return m_exp->cd_r(space, offset, data, lorom, uprom, exram);
|
||||
}
|
||||
|
||||
|
||||
@ -253,46 +251,43 @@ static MOS6566_INTERFACE( vic_intf )
|
||||
// sid6581_interface sid_intf
|
||||
//-------------------------------------------------
|
||||
|
||||
static int vic10_paddle_read( device_t *device, int which )
|
||||
UINT8 vic10_state::paddle_read(int which)
|
||||
{
|
||||
running_machine &machine = device->machine();
|
||||
vic10_state *state = device->machine().driver_data<vic10_state>();
|
||||
|
||||
int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
|
||||
UINT8 cia0porta = mos6526_pa_r(state->m_cia, 0);
|
||||
int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07;
|
||||
int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70;
|
||||
UINT8 cia0porta = mos6526_pa_r(m_cia, 0);
|
||||
int controller1 = ioport("CTRLSEL")->read() & 0x07;
|
||||
int controller2 = ioport("CTRLSEL")->read() & 0x70;
|
||||
// Notice that only a single input is defined for Mouse & Lightpen in both ports
|
||||
switch (controller1)
|
||||
{
|
||||
case 0x01:
|
||||
if (which)
|
||||
pot2 = machine.root_device().ioport("PADDLE2")->read();
|
||||
pot2 = ioport("PADDLE2")->read();
|
||||
else
|
||||
pot1 = machine.root_device().ioport("PADDLE1")->read();
|
||||
pot1 = ioport("PADDLE1")->read();
|
||||
break;
|
||||
|
||||
case 0x02:
|
||||
if (which)
|
||||
pot2 = machine.root_device().ioport("TRACKY")->read();
|
||||
pot2 = ioport("TRACKY")->read();
|
||||
else
|
||||
pot1 = machine.root_device().ioport("TRACKX")->read();
|
||||
pot1 = ioport("TRACKX")->read();
|
||||
break;
|
||||
|
||||
case 0x03:
|
||||
if (which && (machine.root_device().ioport("JOY1_2B")->read() & 0x20)) // Joy1 Button 2
|
||||
if (which && (ioport("JOY1_2B")->read() & 0x20)) // Joy1 Button 2
|
||||
pot1 = 0x00;
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
if (which)
|
||||
pot2 = machine.root_device().ioport("LIGHTY")->read();
|
||||
pot2 = ioport("LIGHTY")->read();
|
||||
else
|
||||
pot1 = machine.root_device().ioport("LIGHTX")->read();
|
||||
pot1 = ioport("LIGHTX")->read();
|
||||
break;
|
||||
|
||||
case 0x06:
|
||||
if (which && (machine.root_device().ioport("OTHER")->read() & 0x04)) // Lightpen Signal
|
||||
if (which && (ioport("OTHER")->read() & 0x04)) // Lightpen Signal
|
||||
pot2 = 0x00;
|
||||
break;
|
||||
|
||||
@ -309,32 +304,32 @@ static int vic10_paddle_read( device_t *device, int which )
|
||||
{
|
||||
case 0x10:
|
||||
if (which)
|
||||
pot4 = machine.root_device().ioport("PADDLE4")->read();
|
||||
pot4 = ioport("PADDLE4")->read();
|
||||
else
|
||||
pot3 = machine.root_device().ioport("PADDLE3")->read();
|
||||
pot3 = ioport("PADDLE3")->read();
|
||||
break;
|
||||
|
||||
case 0x20:
|
||||
if (which)
|
||||
pot4 = machine.root_device().ioport("TRACKY")->read();
|
||||
pot4 = ioport("TRACKY")->read();
|
||||
else
|
||||
pot3 = machine.root_device().ioport("TRACKX")->read();
|
||||
pot3 = ioport("TRACKX")->read();
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
if (which && (machine.root_device().ioport("JOY2_2B")->read() & 0x20)) // Joy2 Button 2
|
||||
if (which && (ioport("JOY2_2B")->read() & 0x20)) // Joy2 Button 2
|
||||
pot4 = 0x00;
|
||||
break;
|
||||
|
||||
case 0x40:
|
||||
if (which)
|
||||
pot4 = machine.root_device().ioport("LIGHTY")->read();
|
||||
pot4 = ioport("LIGHTY")->read();
|
||||
else
|
||||
pot3 = machine.root_device().ioport("LIGHTX")->read();
|
||||
pot3 = ioport("LIGHTX")->read();
|
||||
break;
|
||||
|
||||
case 0x60:
|
||||
if (which && (machine.root_device().ioport("OTHER")->read() & 0x04)) // Lightpen Signal
|
||||
if (which && (ioport("OTHER")->read() & 0x04)) // Lightpen Signal
|
||||
pot4 = 0x00;
|
||||
break;
|
||||
|
||||
@ -347,7 +342,7 @@ static int vic10_paddle_read( device_t *device, int which )
|
||||
break;
|
||||
}
|
||||
|
||||
if (machine.root_device().ioport("CTRLSEL")->read() & 0x80) // Swap
|
||||
if (ioport("CTRLSEL")->read() & 0x80) // Swap
|
||||
{
|
||||
temp = pot1; pot1 = pot3; pot3 = temp;
|
||||
temp = pot2; pot2 = pot4; pot4 = temp;
|
||||
@ -369,9 +364,20 @@ static int vic10_paddle_read( device_t *device, int which )
|
||||
}
|
||||
}
|
||||
|
||||
static const sid6581_interface sid_intf =
|
||||
READ8_MEMBER( vic10_state::sid_potx_r )
|
||||
{
|
||||
vic10_paddle_read
|
||||
return paddle_read(0);
|
||||
}
|
||||
|
||||
READ8_MEMBER( vic10_state::sid_poty_r )
|
||||
{
|
||||
return paddle_read(1);
|
||||
}
|
||||
|
||||
static MOS6581_INTERFACE( sid_intf )
|
||||
{
|
||||
DEVCB_DRIVER_MEMBER(vic10_state, sid_potx_r),
|
||||
DEVCB_DRIVER_MEMBER(vic10_state, sid_poty_r)
|
||||
};
|
||||
|
||||
|
||||
|
@ -123,7 +123,7 @@ enum
|
||||
|
||||
READ8_MEMBER( vic20_state::read )
|
||||
{
|
||||
UINT8 data = 0;
|
||||
UINT8 data = mos6560_bus_r(m_vic);
|
||||
|
||||
int ram1 = 1, ram2 = 1, ram3 = 1;
|
||||
int blk1 = 1, blk2 = 1, blk3 = 1, blk5 = 1;
|
||||
@ -194,9 +194,7 @@ READ8_MEMBER( vic20_state::read )
|
||||
break;
|
||||
}
|
||||
|
||||
data |= m_exp->cd_r(space, offset & 0x1fff, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
|
||||
|
||||
return data;
|
||||
return m_exp->cd_r(space, offset & 0x1fff, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
|
||||
}
|
||||
|
||||
|
||||
@ -450,15 +448,13 @@ READ8_MEMBER( vic20_state::via0_pa_r )
|
||||
data |= m_user->joy1_r() << 3;
|
||||
data |= m_user->joy2_r() << 4;
|
||||
data |= m_user->light_pen_r() << 5;
|
||||
data |= m_user->cassette_switch_r() << 6;
|
||||
|
||||
// cassette switch
|
||||
data |= (m_user->cassette_switch_r() && m_cassette->sense_r()) << 6;
|
||||
|
||||
// joystick
|
||||
data &= ~(ioport("JOY")->read() & 0x3c);
|
||||
|
||||
// cassette switch
|
||||
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
|
||||
data &= ~0x40;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -483,20 +479,6 @@ WRITE8_MEMBER( vic20_state::via0_pa_w )
|
||||
m_iec->atn_w(!BIT(data, 7));
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( vic20_state::via0_ca2_w )
|
||||
{
|
||||
if (!state)
|
||||
{
|
||||
m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
|
||||
m_cassette_timer->enable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
|
||||
m_cassette_timer->enable(false);
|
||||
}
|
||||
}
|
||||
|
||||
static const via6522_interface via0_intf =
|
||||
{
|
||||
DEVCB_DRIVER_MEMBER(vic20_state, via0_pa_r),
|
||||
@ -509,7 +491,7 @@ static const via6522_interface via0_intf =
|
||||
DEVCB_DEVICE_MEMBER(VIC20_USER_PORT_TAG, vic20_user_port_device, pb_w),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_LINE_MEMBER(VIC20_USER_PORT_TAG, vic20_user_port_device, cb1_w),
|
||||
DEVCB_DRIVER_LINE_MEMBER(vic20_state, via0_ca2_w), // CASS MOTOR
|
||||
DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, motor_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(VIC20_USER_PORT_TAG, vic20_user_port_device, cb2_w),
|
||||
DEVCB_CPU_INPUT_LINE(M6502_TAG, INPUT_LINE_NMI)
|
||||
};
|
||||
@ -593,7 +575,7 @@ WRITE8_MEMBER( vic20_state::via1_pb_w )
|
||||
*/
|
||||
|
||||
// cassette write
|
||||
m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
|
||||
m_cassette->write(BIT(data, 3));
|
||||
|
||||
// keyboard column
|
||||
m_key_col = data;
|
||||
@ -615,7 +597,7 @@ static const via6522_interface via1_intf =
|
||||
{
|
||||
DEVCB_DRIVER_MEMBER(vic20_state, via1_pa_r),
|
||||
DEVCB_DRIVER_MEMBER(vic20_state, via1_pb_r),
|
||||
DEVCB_NULL, // CASS READ
|
||||
DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, read),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
@ -632,16 +614,13 @@ static const via6522_interface via1_intf =
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// TIMER_DEVICE_CALLBACK( cassette_tick )
|
||||
// PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
|
||||
//-------------------------------------------------
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( cassette_tick )
|
||||
static PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
|
||||
{
|
||||
vic20_state *state = timer.machine().driver_data<vic20_state>();
|
||||
int data = (state->m_cassette->input() > +0.0) ? 1 : 0;
|
||||
|
||||
state->m_via1->write_ca1(data);
|
||||
}
|
||||
DEVCB_DEVICE_LINE_MEMBER(M6522_1_TAG, via6522_device, write_ca1),
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -808,15 +787,13 @@ void vic20_state::machine_reset()
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( vic20_common, vic20_state )
|
||||
MCFG_TIMER_ADD_PERIODIC(TIMER_C1530_TAG, cassette_tick, attotime::from_hz(44100))
|
||||
|
||||
// devices
|
||||
MCFG_VIA6522_ADD(M6522_0_TAG, 0, via0_intf)
|
||||
MCFG_VIA6522_ADD(M6522_1_TAG, 0, via1_intf)
|
||||
|
||||
MCFG_QUICKLOAD_ADD("quickload", cbm_vc20, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface )
|
||||
|
||||
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
|
||||
MCFG_CBM_IEC_ADD(cbm_iec_intf, "c1541")
|
||||
|
||||
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
|
||||
|
@ -32,6 +32,9 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( vic_interrupt );
|
||||
DECLARE_READ8_MEMBER( vic_rdy_cb );
|
||||
|
||||
DECLARE_READ8_MEMBER( sid_potx_r );
|
||||
DECLARE_READ8_MEMBER( sid_poty_r );
|
||||
|
||||
UINT8 *m_c128_basic;
|
||||
UINT8 *m_c128_kernal;
|
||||
UINT8 *m_c128_chargen;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "machine/c64user.h"
|
||||
#include "machine/cbmiec.h"
|
||||
#include "machine/cbmipt.h"
|
||||
#include "machine/petcass.h"
|
||||
#include "machine/pls100.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/vcsctrl.h"
|
||||
@ -27,7 +28,6 @@
|
||||
#define MOS6526_2_TAG "u2"
|
||||
#define PLA_TAG "u17"
|
||||
#define SCREEN_TAG "screen"
|
||||
#define TIMER_C1531_TAG "c1531"
|
||||
#define CONTROL1_TAG "joy1"
|
||||
#define CONTROL2_TAG "joy2"
|
||||
|
||||
@ -48,8 +48,7 @@ public:
|
||||
m_exp(*this, C64_EXPANSION_SLOT_TAG),
|
||||
m_user(*this, C64_USER_PORT_TAG),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_cassette(*this, CASSETTE_TAG),
|
||||
m_cassette_timer(*this, TIMER_C1531_TAG),
|
||||
m_cassette(*this, PET_DATASSETTE_PORT_TAG),
|
||||
m_loram(1),
|
||||
m_hiram(1),
|
||||
m_charen(1),
|
||||
@ -77,8 +76,7 @@ public:
|
||||
required_device<c64_expansion_slot_device> m_exp;
|
||||
required_device<c64_user_port_device> m_user;
|
||||
required_device<ram_device> m_ram;
|
||||
optional_device<cassette_image_device> m_cassette;
|
||||
optional_device<timer_device> m_cassette_timer;
|
||||
optional_device<pet_datassette_port_device> m_cassette;
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
@ -97,6 +95,9 @@ public:
|
||||
DECLARE_READ8_MEMBER( vic_lightpen_button_cb );
|
||||
DECLARE_READ8_MEMBER( vic_rdy_cb );
|
||||
|
||||
DECLARE_READ8_MEMBER( sid_potx_r );
|
||||
DECLARE_READ8_MEMBER( sid_poty_r );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( cia1_irq_w );
|
||||
DECLARE_READ8_MEMBER( cia1_pa_r );
|
||||
DECLARE_READ8_MEMBER( cia1_pb_r );
|
||||
@ -109,6 +110,8 @@ public:
|
||||
DECLARE_READ8_MEMBER( cpu_r );
|
||||
DECLARE_WRITE8_MEMBER( cpu_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( tape_read_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( iec_srq_w );
|
||||
|
||||
DECLARE_READ8_MEMBER( exp_dma_r );
|
||||
@ -179,5 +182,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
int c64_paddle_read (device_t *device, int which);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -59,6 +59,9 @@ public:
|
||||
int m_io_dc00_on;
|
||||
DECLARE_DRIVER_INIT(c65);
|
||||
DECLARE_DRIVER_INIT(c65pal);
|
||||
|
||||
DECLARE_READ8_MEMBER( sid_potx_r );
|
||||
DECLARE_READ8_MEMBER( sid_poty_r );
|
||||
};
|
||||
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/mm58274c.h"
|
||||
#include "machine/upd765.h"
|
||||
#include "machine/compiskb.h"
|
||||
#include "imagedev/flopdrv.h"
|
||||
#include "formats/cpis_dsk.h"
|
||||
|
||||
|
@ -8,7 +8,14 @@
|
||||
#define Z80PIO1_TAG "z80pio1"
|
||||
#define Z80PIO2_TAG "z80pio2"
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/z80pio.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/z80ctc.h"
|
||||
|
||||
class amu880_state : public driver_device
|
||||
{
|
||||
@ -18,9 +25,9 @@ public:
|
||||
m_cassette(*this, CASSETTE_TAG),
|
||||
m_key_d6(0),
|
||||
m_key_d7(0),
|
||||
m_key_a8(1)
|
||||
,
|
||||
m_video_ram(*this, "video_ram"){ }
|
||||
m_key_a8(1),
|
||||
m_video_ram(*this, "video_ram")
|
||||
{ }
|
||||
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "machine/cbmiec.h"
|
||||
#include "machine/cbmipt.h"
|
||||
#include "machine/mos6529.h"
|
||||
#include "machine/petcass.h"
|
||||
#include "machine/pls100.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
@ -25,7 +26,6 @@
|
||||
#define T6721_TAG "t6721"
|
||||
#define PLA_TAG "u19"
|
||||
#define SCREEN_TAG "screen"
|
||||
#define CASSETTE_TAG "cassette"
|
||||
|
||||
class plus4_state : public driver_device
|
||||
{
|
||||
@ -43,8 +43,9 @@ public:
|
||||
m_exp(*this, PLUS4_EXPANSION_SLOT_TAG),
|
||||
m_user(*this, PLUS4_USER_PORT_TAG),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_cassette(*this, CASSETTE_TAG),
|
||||
m_cassette(*this, PET_DATASSETTE_PORT_TAG),
|
||||
m_function(NULL),
|
||||
m_c2(NULL),
|
||||
m_addr(0),
|
||||
m_rom_en(1),
|
||||
m_ted_irq(CLEAR_LINE),
|
||||
@ -63,7 +64,7 @@ public:
|
||||
required_device<plus4_expansion_slot_device> m_exp;
|
||||
optional_device<plus4_user_port_device> m_user;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<pet_datassette_port_device> m_cassette;
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
@ -95,6 +96,7 @@ public:
|
||||
// memory state
|
||||
const UINT8 *m_kernal;
|
||||
const UINT8 *m_function;
|
||||
const UINT8 *m_c2;
|
||||
UINT8 m_addr;
|
||||
int m_rom_en;
|
||||
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
|
||||
void check_interrupts();
|
||||
UINT8 paddle_read(int which);
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
@ -62,12 +63,18 @@ public:
|
||||
DECLARE_READ8_MEMBER( vic_lightpen_y_cb );
|
||||
DECLARE_READ8_MEMBER( vic_lightpen_button_cb );
|
||||
DECLARE_READ8_MEMBER( vic_rdy_cb );
|
||||
|
||||
DECLARE_READ8_MEMBER( sid_potx_r );
|
||||
DECLARE_READ8_MEMBER( sid_poty_r );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( cia_irq_w );
|
||||
DECLARE_READ8_MEMBER( cia_pa_r );
|
||||
DECLARE_READ8_MEMBER( cia_pb_r );
|
||||
DECLARE_WRITE8_MEMBER( cia_pb_w );
|
||||
|
||||
DECLARE_READ8_MEMBER( cpu_r );
|
||||
DECLARE_WRITE8_MEMBER( cpu_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( exp_irq_w );
|
||||
|
||||
// video state
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "machine/cbmiec.h"
|
||||
#include "machine/cbmipt.h"
|
||||
#include "machine/ieee488.h"
|
||||
#include "machine/petcass.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/vcsctrl.h"
|
||||
#include "machine/vic20exp.h"
|
||||
@ -26,7 +27,6 @@
|
||||
#define M6560_TAG "ub7"
|
||||
#define M6561_TAG "ub7"
|
||||
#define IEC_TAG "iec"
|
||||
#define TIMER_C1530_TAG "c1530"
|
||||
#define SCREEN_TAG "screen"
|
||||
#define CONTROL1_TAG "joy1"
|
||||
#define CONTROL2_TAG "joy2"
|
||||
@ -45,9 +45,8 @@ public:
|
||||
m_joy2(*this, CONTROL2_TAG),
|
||||
m_exp(*this, VIC20_EXPANSION_SLOT_TAG),
|
||||
m_user(*this, VIC20_USER_PORT_TAG),
|
||||
m_cassette(*this, CASSETTE_TAG),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_cassette_timer(*this, TIMER_C1530_TAG)
|
||||
m_cassette(*this, PET_DATASSETTE_PORT_TAG),
|
||||
m_ram(*this, RAM_TAG)
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -59,9 +58,8 @@ public:
|
||||
required_device<vcs_control_port_device> m_joy2;
|
||||
required_device<vic20_expansion_slot_device> m_exp;
|
||||
required_device<vic20_user_port_device> m_user;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<pet_datassette_port_device> m_cassette;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<timer_device> m_cassette_timer;
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
@ -71,7 +69,6 @@ public:
|
||||
|
||||
DECLARE_READ8_MEMBER( via0_pa_r );
|
||||
DECLARE_WRITE8_MEMBER( via0_pa_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( via0_ca2_w );
|
||||
|
||||
DECLARE_READ8_MEMBER( via1_pa_r );
|
||||
DECLARE_READ8_MEMBER( via1_pb_r );
|
||||
|
@ -59,10 +59,8 @@ void c128_comal80_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c128_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c128_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!romh)
|
||||
{
|
||||
offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_config_complete() { m_shortname = "c128_comal80"; }
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -571,9 +571,9 @@ bool c1551_device::tpi1_selected(offs_t offset)
|
||||
// plus4_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c1551_device::plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
|
||||
UINT8 c1551_device::plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
|
||||
{
|
||||
UINT8 data = m_exp->cd_r(space, offset, ba, cs0, c1l, c2l, cs1, c1h, c2h);
|
||||
data = m_exp->cd_r(space, offset, data, ba, cs0, c1l, c2l, cs1, c1h, c2h);
|
||||
|
||||
if (tpi1_selected(offset))
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
||||
// device_plus4_expansion_card_interface overrides
|
||||
virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
|
||||
virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
|
||||
virtual void plus4_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
|
||||
virtual UINT32 plus4_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
virtual void plus4_breset_w(int state);
|
||||
|
153
src/mess/machine/c2n.c
Normal file
153
src/mess/machine/c2n.c
Normal file
@ -0,0 +1,153 @@
|
||||
/**********************************************************************
|
||||
|
||||
Commodore C2N/1530/1531 Datassette emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "c2n.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS / CONSTANTS
|
||||
//**************************************************************************
|
||||
|
||||
#define CASSETTE_TAG "cassette"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type C1530 = &device_creator<c1530_device>;
|
||||
const device_type C1531 = &device_creator<c1531_device>;
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG( c2n )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( c2n )
|
||||
MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor c2n_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( c2n );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// c2n_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
c2n_device::c2n_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, type, name, tag, owner, clock),
|
||||
device_pet_datassette_port_interface(mconfig, *this),
|
||||
m_cassette(*this, CASSETTE_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c1530_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
c1530_device::c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: c2n_device(mconfig, C1530, "C1530", tag, owner, clock) { }
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// c1531_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
c1531_device::c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: c2n_device(mconfig, C1531, "C1531", tag, owner, clock) { }
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void c2n_device::device_start()
|
||||
{
|
||||
// allocate timers
|
||||
m_read_timer = timer_alloc();
|
||||
m_read_timer->adjust(attotime::from_hz(44100), 0, attotime::from_hz(44100));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_timer - handler timer events
|
||||
//-------------------------------------------------
|
||||
|
||||
void c2n_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
int input = (m_cassette->input() > +0.0) ? 1 : 0;
|
||||
|
||||
m_slot->read_w(input);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// datassette_read - read data
|
||||
//-------------------------------------------------
|
||||
|
||||
int c2n_device::datassette_read()
|
||||
{
|
||||
return (m_cassette->input() > +0.0) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// datassette_write - write data
|
||||
//-------------------------------------------------
|
||||
|
||||
void c2n_device::datassette_write(int state)
|
||||
{
|
||||
m_cassette->output(state ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// datassette_sense - switch sense
|
||||
//-------------------------------------------------
|
||||
|
||||
int c2n_device::datassette_sense()
|
||||
{
|
||||
return (m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// datassette_motor - motor
|
||||
//-------------------------------------------------
|
||||
|
||||
void c2n_device::datassette_motor(int state)
|
||||
{
|
||||
if (!state)
|
||||
{
|
||||
m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
|
||||
m_read_timer->enable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
|
||||
m_read_timer->enable(false);
|
||||
}
|
||||
}
|
85
src/mess/machine/c2n.h
Normal file
85
src/mess/machine/c2n.h
Normal file
@ -0,0 +1,85 @@
|
||||
/**********************************************************************
|
||||
|
||||
Commodore C2N/1530/1531 Datassette emulation
|
||||
|
||||
Copyright MESS Team.
|
||||
Visit http://mamedev.org for licensing and usage restrictions.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __C2N__
|
||||
#define __C2N__
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/cbm.h"
|
||||
#include "machine/petcass.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> c2n_device
|
||||
|
||||
class c2n_device : public device_t,
|
||||
public device_pet_datassette_port_interface
|
||||
{
|
||||
|
||||
public:
|
||||
// construction/destruction
|
||||
c2n_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete() { m_shortname = "c2n"; }
|
||||
virtual void device_start();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
||||
// device_pet_datassette_port_interface overrides
|
||||
virtual int datassette_read();
|
||||
virtual void datassette_write(int state);
|
||||
virtual int datassette_sense();
|
||||
virtual void datassette_motor(int state);
|
||||
|
||||
private:
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
|
||||
// timers
|
||||
emu_timer *m_read_timer;
|
||||
};
|
||||
|
||||
|
||||
// ======================> c1530_device
|
||||
|
||||
class c1530_device : public c2n_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
// ======================> c1531_device
|
||||
|
||||
class c1531_device : public c2n_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type C1530;
|
||||
extern const device_type C1531;
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -132,10 +132,8 @@ void c64_16kb_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_16kb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_16kb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
};
|
||||
|
||||
|
||||
|
@ -59,10 +59,8 @@ void c64_comal80_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !romh)
|
||||
{
|
||||
offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_config_complete() { m_shortname = "c64_comal80"; }
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -200,10 +200,8 @@ void c64_currah_speech_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!romh)
|
||||
{
|
||||
data = m_romh[offset & 0x1fff];
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -126,10 +126,8 @@ void c64_dela_ep256_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
if (m_reset)
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -110,10 +110,8 @@ void c64_dela_ep64_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
if (m_reset)
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -120,10 +120,8 @@ void c64_dela_ep7x8_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = offset & 0x1fff;
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -59,10 +59,8 @@ void c64_dinamic_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_dinamic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_dinamic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_config_complete() { m_shortname = "c64_dinamic"; }
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
UINT8 m_bank;
|
||||
|
@ -76,10 +76,8 @@ void c64_dqbb_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_dqbb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_dqbb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!m_cs && (!roml || !romh))
|
||||
{
|
||||
data = m_nvram[offset & 0x3fff];
|
||||
|
@ -45,7 +45,7 @@ protected:
|
||||
virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram_size); } }
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -80,10 +80,8 @@ void c64_easy_calc_result_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_easy_calc_result_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_easy_calc_result_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_config_complete() { m_shortname = "c64_easy_calc_result"; }
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -132,10 +132,8 @@ void c64_easyflash_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_easyflash_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_easyflash_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -45,7 +45,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
|
||||
virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
||||
|
@ -80,10 +80,8 @@ void c64_epyx_fast_load_cartridge_device::device_timer(emu_timer &timer, device_
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
m_exrom = 0;
|
||||
|
@ -39,7 +39,7 @@ protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -47,10 +47,8 @@ void c64_exos_cartridge_device::device_start()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_exos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_exos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!romh)
|
||||
{
|
||||
data = m_romh[offset & 0x1fff];
|
||||
|
@ -37,7 +37,7 @@ protected:
|
||||
virtual void device_start();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
||||
};
|
||||
|
||||
|
@ -95,10 +95,8 @@ void c64_final_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_final_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_final_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !romh || !io1 || !io2)
|
||||
{
|
||||
data = m_roml[offset & 0x3fff];
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
};
|
||||
|
||||
|
@ -105,10 +105,8 @@ void c64_final3_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_final3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_final3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !romh || !io1 || !io2)
|
||||
{
|
||||
offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -59,10 +59,8 @@ void c64_fun_play_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_fun_play_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_fun_play_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -62,10 +62,8 @@ void c64_georam_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_georam_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_georam_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!io1)
|
||||
{
|
||||
offs_t addr = (m_bank << 8) | (offset & 0xff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -149,11 +149,10 @@ void c64_ide64_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
if (!m_enable) return 0;
|
||||
if (!m_enable) return data;
|
||||
|
||||
UINT8 data = 0;
|
||||
int rom_oe = 1, ram_oe = 1;
|
||||
|
||||
if (!m_game && m_exrom && ba)
|
||||
|
@ -46,7 +46,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -277,9 +277,9 @@ void c64_ieee488_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_ieee488_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_ieee488_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
|
||||
data = m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
||||
|
||||
|
@ -57,10 +57,8 @@ void c64_kingsoft_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_kingsoft_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_kingsoft_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
||||
};
|
||||
|
@ -57,10 +57,8 @@ void c64_mach5_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_mach5_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_mach5_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !io1 || !io2)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
};
|
||||
|
||||
|
@ -59,10 +59,8 @@ void c64_magic_desk_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_magic_desk_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_magic_desk_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -223,10 +223,8 @@ void c64_magic_formel_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!romh && !m_rom_oe)
|
||||
{
|
||||
UINT8 bank = m_pb7_ff ? m_rom_bank : 0;
|
||||
|
@ -50,7 +50,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
||||
|
||||
|
@ -47,10 +47,8 @@ void c64_mikro_assembler_cartridge_device::device_start()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_mikro_assembler_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_mikro_assembler_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !romh || !io1 || !io2)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -37,7 +37,7 @@ protected:
|
||||
virtual void device_start();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
};
|
||||
|
||||
|
||||
|
@ -208,10 +208,8 @@ void c64_multiscreen_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_multiscreen_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_multiscreen_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
int bank = m_bank & 0x0f;
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -63,10 +63,8 @@ void c64_neoram_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_neoram_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_neoram_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!io1)
|
||||
{
|
||||
offs_t addr = (m_bank << 8) | (offset & 0xff);
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram_size); } }
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -81,10 +81,8 @@ void c64_ocean_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_ocean_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_ocean_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -81,10 +81,8 @@ void c64_pagefox_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_pagefox_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_pagefox_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !romh)
|
||||
{
|
||||
if (BIT(m_bank, 3))
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -59,10 +59,8 @@ void c64_prophet64_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_prophet64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_prophet64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -130,10 +130,8 @@ void c64_ps64_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -42,7 +42,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
};
|
||||
|
||||
|
@ -57,10 +57,8 @@ void c64_rex_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_rex_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_rex_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
};
|
||||
|
||||
|
||||
|
@ -126,10 +126,8 @@ void c64_rex_ep256_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
if (m_reset)
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -62,10 +62,8 @@ void c64_ross_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml || !romh)
|
||||
{
|
||||
offs_t addr = (m_bank << 14) | (offset & 0x3fff);
|
||||
|
@ -39,7 +39,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -235,9 +235,9 @@ void c64_sfx_sound_expander_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
|
||||
data = m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
|
||||
|
||||
if (!io2)
|
||||
{
|
||||
@ -245,19 +245,19 @@ UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, of
|
||||
{
|
||||
switch (offset & 0x07)
|
||||
{
|
||||
case 0: data |= ioport("KB0")->read(); break;
|
||||
case 1: data |= ioport("KB1")->read(); break;
|
||||
case 2: data |= ioport("KB2")->read(); break;
|
||||
case 3: data |= ioport("KB3")->read(); break;
|
||||
case 4: data |= ioport("KB4")->read(); break;
|
||||
case 5: data |= ioport("KB5")->read(); break;
|
||||
case 6: data |= ioport("KB6")->read(); break;
|
||||
case 7: data |= ioport("KB7")->read(); break;
|
||||
case 0: data = ioport("KB0")->read(); break;
|
||||
case 1: data = ioport("KB1")->read(); break;
|
||||
case 2: data = ioport("KB2")->read(); break;
|
||||
case 3: data = ioport("KB3")->read(); break;
|
||||
case 4: data = ioport("KB4")->read(); break;
|
||||
case 5: data = ioport("KB5")->read(); break;
|
||||
case 6: data = ioport("KB6")->read(); break;
|
||||
case 7: data = ioport("KB7")->read(); break;
|
||||
}
|
||||
}
|
||||
else if (BIT(offset, 5))
|
||||
{
|
||||
data |= ym3526_r(m_opl, BIT(offset, 4));
|
||||
data = ym3526_r(m_opl, BIT(offset, 4));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
|
||||
virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
|
||||
|
@ -92,10 +92,8 @@ void c64_silverrock_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_silverrock_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_silverrock_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
offs_t addr = (m_bank << 13) | (offset & 0x1fff);
|
||||
|
@ -38,7 +38,7 @@ protected:
|
||||
virtual void device_reset();
|
||||
|
||||
// device_c64_expansion_card_interface overrides
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
|
||||
|
||||
private:
|
||||
|
@ -57,10 +57,8 @@ void c64_simons_basic_cartridge_device::device_reset()
|
||||
// c64_cd_r - cartridge data read
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 c64_simons_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
|
||||
UINT8 c64_simons_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
|
||||
{
|
||||
UINT8 data = 0;
|
||||
|
||||
if (!roml)
|
||||
{
|
||||
data = m_roml[offset & 0x1fff];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user