mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
Made Orion use new floppy system (no whatsnew)
This commit is contained in:
parent
e35c025033
commit
3a55d70dbb
@ -53,21 +53,25 @@ const char *smx_format::name() const
|
|||||||
|
|
||||||
const char *smx_format::description() const
|
const char *smx_format::description() const
|
||||||
{
|
{
|
||||||
return "Specialist MX disk image";
|
return "Specialist MX/Orion/B2M disk image";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *smx_format::extensions() const
|
const char *smx_format::extensions() const
|
||||||
{
|
{
|
||||||
return "odi,cpm";
|
return "odi,cpm,img";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unverified gap sizes
|
// Unverified gap sizes
|
||||||
const smx_format::format smx_format::formats[] =
|
const smx_format::format smx_format::formats[] =
|
||||||
{
|
{
|
||||||
{ // 720K 5.25 inch
|
{ // Specialist MX/Orion/B2M disk image
|
||||||
floppy_image::FF_525, floppy_image::DSQD,
|
floppy_image::FF_525, floppy_image::DSQD,
|
||||||
2000, 5, 80, 2, 1024, {}, 1, {}, 100, 22, 20
|
2000, 5, 80, 2, 1024, {}, 1, {}, 100, 22, 20
|
||||||
},
|
},
|
||||||
|
{ // Lucksian Key Orion disk image
|
||||||
|
floppy_image::FF_525, floppy_image::DSQD,
|
||||||
|
2000, 9, 80, 2, 512, {}, 1, {}, 100, 22, 20
|
||||||
|
},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,11 +15,9 @@
|
|||||||
#include "sound/speaker.h"
|
#include "sound/speaker.h"
|
||||||
#include "sound/wave.h"
|
#include "sound/wave.h"
|
||||||
#include "machine/mc146818.h"
|
#include "machine/mc146818.h"
|
||||||
#include "machine/wd17xx.h"
|
|
||||||
#include "imagedev/flopdrv.h"
|
|
||||||
#include "formats/basicdsk.h"
|
|
||||||
#include "imagedev/cassette.h"
|
#include "imagedev/cassette.h"
|
||||||
#include "imagedev/cartslot.h"
|
#include "imagedev/cartslot.h"
|
||||||
|
#include "formats/smx_dsk.h"
|
||||||
#include "formats/rk_cas.h"
|
#include "formats/rk_cas.h"
|
||||||
#include "includes/orion.h"
|
#include "includes/orion.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
@ -87,41 +85,13 @@ static const cassette_interface orion_cassette_interface =
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static LEGACY_FLOPPY_OPTIONS_START(orion)
|
FLOPPY_FORMATS_MEMBER( orion_state::orion_floppy_formats )
|
||||||
LEGACY_FLOPPY_OPTION(orion, "odi,img", "Orion disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
FLOPPY_SMX_FORMAT
|
||||||
HEADS([2])
|
FLOPPY_FORMATS_END
|
||||||
TRACKS([80])
|
|
||||||
SECTORS([5])
|
|
||||||
SECTOR_LENGTH([1024])
|
|
||||||
FIRST_SECTOR_ID([1]))
|
|
||||||
LEGACY_FLOPPY_OPTION(orion_lk, "odi,img", "Lucksian Key Orion disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
|
||||||
HEADS([2])
|
|
||||||
TRACKS([80])
|
|
||||||
SECTORS([9])
|
|
||||||
SECTOR_LENGTH([512])
|
|
||||||
FIRST_SECTOR_ID([1]))
|
|
||||||
LEGACY_FLOPPY_OPTIONS_END
|
|
||||||
|
|
||||||
static const wd17xx_interface orion_wd17xx_interface =
|
static SLOT_INTERFACE_START( orion_floppies )
|
||||||
{
|
SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
|
||||||
DEVCB_LINE_VCC,
|
SLOT_INTERFACE_END
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
{ FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const floppy_interface orion_floppy_interface =
|
|
||||||
{
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
FLOPPY_STANDARD_5_25_DSHD,
|
|
||||||
LEGACY_FLOPPY_OPTIONS_NAME(orion),
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Machine driver */
|
/* Machine driver */
|
||||||
static MACHINE_CONFIG_START( orion128, orion_state )
|
static MACHINE_CONFIG_START( orion128, orion_state )
|
||||||
@ -155,9 +125,12 @@ static MACHINE_CONFIG_START( orion128, orion_state )
|
|||||||
|
|
||||||
MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
|
MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
|
||||||
|
|
||||||
MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface )
|
MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
|
||||||
|
|
||||||
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(orion_floppy_interface)
|
MCFG_FLOPPY_DRIVE_ADD("fd0", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd1", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd2", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
|
||||||
MCFG_CARTSLOT_ADD("cart")
|
MCFG_CARTSLOT_ADD("cart")
|
||||||
|
|
||||||
@ -218,9 +191,12 @@ static MACHINE_CONFIG_START( orionz80, orion_state )
|
|||||||
|
|
||||||
MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
|
MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
|
||||||
|
|
||||||
MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface )
|
MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
|
||||||
|
|
||||||
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(orion_floppy_interface)
|
MCFG_FLOPPY_DRIVE_ADD("fd0", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd1", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd2", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
|
||||||
MCFG_CARTSLOT_ADD("cart")
|
MCFG_CARTSLOT_ADD("cart")
|
||||||
|
|
||||||
@ -271,9 +247,12 @@ static MACHINE_CONFIG_START( orionpro, orion_state )
|
|||||||
|
|
||||||
MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
|
MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
|
||||||
|
|
||||||
MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface )
|
MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
|
||||||
|
|
||||||
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(orion_floppy_interface)
|
MCFG_FLOPPY_DRIVE_ADD("fd0", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd1", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd2", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats)
|
||||||
|
|
||||||
MCFG_CARTSLOT_ADD("cart")
|
MCFG_CARTSLOT_ADD("cart")
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#ifndef ORION_H_
|
#ifndef ORION_H_
|
||||||
#define ORION_H_
|
#define ORION_H_
|
||||||
|
|
||||||
|
#include "machine/wd_fdc.h"
|
||||||
#include "includes/radio86.h"
|
#include "includes/radio86.h"
|
||||||
#include "machine/i8255.h"
|
#include "machine/i8255.h"
|
||||||
|
|
||||||
@ -14,7 +15,9 @@ class orion_state : public radio86_state
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
orion_state(const machine_config &mconfig, device_type type, const char *tag)
|
orion_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: radio86_state(mconfig, type, tag) { }
|
: radio86_state(mconfig, type, tag),
|
||||||
|
m_fdc(*this, "fd1793")
|
||||||
|
{ }
|
||||||
|
|
||||||
UINT8 m_orion128_video_mode;
|
UINT8 m_orion128_video_mode;
|
||||||
UINT8 m_orion128_video_page;
|
UINT8 m_orion128_video_page;
|
||||||
@ -34,6 +37,9 @@ public:
|
|||||||
UINT8 m_orionpro_128_page;
|
UINT8 m_orionpro_128_page;
|
||||||
UINT8 m_orionpro_rom2_segment;
|
UINT8 m_orionpro_rom2_segment;
|
||||||
UINT8 m_orionpro_dispatcher;
|
UINT8 m_orionpro_dispatcher;
|
||||||
|
|
||||||
|
required_device<fd1793_t> m_fdc;
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER(orion128_system_r);
|
DECLARE_READ8_MEMBER(orion128_system_r);
|
||||||
DECLARE_WRITE8_MEMBER(orion128_system_w);
|
DECLARE_WRITE8_MEMBER(orion128_system_w);
|
||||||
DECLARE_READ8_MEMBER(orion128_romdisk_r);
|
DECLARE_READ8_MEMBER(orion128_romdisk_r);
|
||||||
@ -67,6 +73,7 @@ public:
|
|||||||
DECLARE_READ8_MEMBER(orion_romdisk_porta_r);
|
DECLARE_READ8_MEMBER(orion_romdisk_porta_r);
|
||||||
DECLARE_WRITE8_MEMBER(orion_romdisk_portb_w);
|
DECLARE_WRITE8_MEMBER(orion_romdisk_portb_w);
|
||||||
DECLARE_WRITE8_MEMBER(orion_romdisk_portc_w);
|
DECLARE_WRITE8_MEMBER(orion_romdisk_portc_w);
|
||||||
|
DECLARE_FLOPPY_FORMATS( orion_floppy_formats );
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in machine/orion.c -----------*/
|
/*----------- defined in machine/orion.c -----------*/
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "cpu/i8085/i8085.h"
|
#include "cpu/i8085/i8085.h"
|
||||||
#include "imagedev/cassette.h"
|
#include "imagedev/cassette.h"
|
||||||
#include "machine/mc146818.h"
|
#include "machine/mc146818.h"
|
||||||
#include "machine/wd17xx.h"
|
|
||||||
#include "sound/speaker.h"
|
#include "sound/speaker.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
#include "includes/orion.h"
|
#include "includes/orion.h"
|
||||||
@ -165,44 +164,45 @@ MACHINE_RESET_MEMBER(orion_state,orion128)
|
|||||||
|
|
||||||
WRITE8_MEMBER(orion_state::orion_disk_control_w)
|
WRITE8_MEMBER(orion_state::orion_disk_control_w)
|
||||||
{
|
{
|
||||||
device_t *fdc = machine().device("wd1793");
|
static const char *names[] = { "fd0", "fd1", "fd2", "fd3"};
|
||||||
|
floppy_image_device *floppy = NULL;
|
||||||
|
floppy_connector *con = machine().device<floppy_connector>(names[data & 3]);
|
||||||
|
if(con)
|
||||||
|
floppy = con->get_device();
|
||||||
|
|
||||||
wd17xx_set_side(fdc,((data & 0x10) >> 4) ^ 1);
|
m_fdc->set_floppy(floppy);
|
||||||
wd17xx_set_drive(fdc,data & 3);
|
floppy->mon_w(0);
|
||||||
|
floppy->ss_w(((data & 0x10) >> 4) ^ 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8_MEMBER(orion_state::orion128_floppy_r)
|
READ8_MEMBER(orion_state::orion128_floppy_r)
|
||||||
{
|
{
|
||||||
device_t *fdc = machine().device("wd1793");
|
|
||||||
|
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case 0x0 :
|
case 0x0 :
|
||||||
case 0x10 : return wd17xx_status_r(fdc,space, 0);
|
case 0x10 : return m_fdc->status_r(space, 0);
|
||||||
case 0x1 :
|
case 0x1 :
|
||||||
case 0x11 : return wd17xx_track_r(fdc,space, 0);
|
case 0x11 : return m_fdc->track_r(space, 0);
|
||||||
case 0x2 :
|
case 0x2 :
|
||||||
case 0x12 : return wd17xx_sector_r(fdc,space, 0);
|
case 0x12 : return m_fdc->sector_r(space, 0);
|
||||||
case 0x3 :
|
case 0x3 :
|
||||||
case 0x13 : return wd17xx_data_r(fdc,space, 0);
|
case 0x13 : return m_fdc->data_r(space, 0);
|
||||||
}
|
}
|
||||||
return 0xff;
|
return 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(orion_state::orion128_floppy_w)
|
WRITE8_MEMBER(orion_state::orion128_floppy_w)
|
||||||
{
|
{
|
||||||
device_t *fdc = machine().device("wd1793");
|
|
||||||
|
|
||||||
switch(offset)
|
switch(offset)
|
||||||
{
|
{
|
||||||
case 0x0 :
|
case 0x0 :
|
||||||
case 0x10 : wd17xx_command_w(fdc,space, 0,data); break;
|
case 0x10 : m_fdc->cmd_w(space, 0,data); break;
|
||||||
case 0x1 :
|
case 0x1 :
|
||||||
case 0x11 : wd17xx_track_w(fdc,space, 0,data);break;
|
case 0x11 : m_fdc->track_w(space, 0,data);break;
|
||||||
case 0x2 :
|
case 0x2 :
|
||||||
case 0x12 : wd17xx_sector_w(fdc,space, 0,data);break;
|
case 0x12 : m_fdc->sector_w(space, 0,data);break;
|
||||||
case 0x3 :
|
case 0x3 :
|
||||||
case 0x13 : wd17xx_data_w(fdc,space, 0,data);break;
|
case 0x13 : m_fdc->data_w(space, 0,data);break;
|
||||||
case 0x4 :
|
case 0x4 :
|
||||||
case 0x14 :
|
case 0x14 :
|
||||||
case 0x20 : orion_disk_control_w(space, offset, data);break;
|
case 0x20 : orion_disk_control_w(space, offset, data);break;
|
||||||
@ -541,8 +541,6 @@ MACHINE_RESET_MEMBER(orion_state,orionpro)
|
|||||||
|
|
||||||
READ8_MEMBER(orion_state::orionpro_io_r)
|
READ8_MEMBER(orion_state::orionpro_io_r)
|
||||||
{
|
{
|
||||||
device_t *fdc = machine().device("wd1793");
|
|
||||||
|
|
||||||
switch (offset & 0xff)
|
switch (offset & 0xff)
|
||||||
{
|
{
|
||||||
case 0x00 : return 0x56;
|
case 0x00 : return 0x56;
|
||||||
@ -552,10 +550,10 @@ READ8_MEMBER(orion_state::orionpro_io_r)
|
|||||||
case 0x08 : return m_orionpro_page;
|
case 0x08 : return m_orionpro_page;
|
||||||
case 0x09 : return m_orionpro_rom2_segment;
|
case 0x09 : return m_orionpro_rom2_segment;
|
||||||
case 0x0a : return m_orionpro_dispatcher;
|
case 0x0a : return m_orionpro_dispatcher;
|
||||||
case 0x10 : return wd17xx_status_r(fdc,space, 0);
|
case 0x10 : return m_fdc->status_r(space, 0);
|
||||||
case 0x11 : return wd17xx_track_r(fdc,space, 0);
|
case 0x11 : return m_fdc->track_r(space, 0);
|
||||||
case 0x12 : return wd17xx_sector_r(fdc,space, 0);
|
case 0x12 : return m_fdc->sector_r(space, 0);
|
||||||
case 0x13 : return wd17xx_data_r(fdc,space, 0);
|
case 0x13 : return m_fdc->data_r(space, 0);
|
||||||
case 0x18 :
|
case 0x18 :
|
||||||
case 0x19 :
|
case 0x19 :
|
||||||
case 0x1a :
|
case 0x1a :
|
||||||
@ -575,8 +573,6 @@ READ8_MEMBER(orion_state::orionpro_io_r)
|
|||||||
|
|
||||||
WRITE8_MEMBER(orion_state::orionpro_io_w)
|
WRITE8_MEMBER(orion_state::orionpro_io_w)
|
||||||
{
|
{
|
||||||
device_t *fdc = machine().device("wd1793");
|
|
||||||
|
|
||||||
switch (offset & 0xff)
|
switch (offset & 0xff)
|
||||||
{
|
{
|
||||||
case 0x04 : m_orionpro_ram0_segment = data; orionpro_bank_switch(machine()); break;
|
case 0x04 : m_orionpro_ram0_segment = data; orionpro_bank_switch(machine()); break;
|
||||||
@ -585,10 +581,10 @@ WRITE8_MEMBER(orion_state::orionpro_io_w)
|
|||||||
case 0x08 : m_orionpro_page = data; orionpro_bank_switch(machine()); break;
|
case 0x08 : m_orionpro_page = data; orionpro_bank_switch(machine()); break;
|
||||||
case 0x09 : m_orionpro_rom2_segment = data; orionpro_bank_switch(machine()); break;
|
case 0x09 : m_orionpro_rom2_segment = data; orionpro_bank_switch(machine()); break;
|
||||||
case 0x0a : m_orionpro_dispatcher = data; orionpro_bank_switch(machine()); break;
|
case 0x0a : m_orionpro_dispatcher = data; orionpro_bank_switch(machine()); break;
|
||||||
case 0x10 : wd17xx_command_w(fdc,space, 0,data); break;
|
case 0x10 : m_fdc->cmd_w(space, 0,data); break;
|
||||||
case 0x11 : wd17xx_track_w(fdc,space, 0,data);break;
|
case 0x11 : m_fdc->track_w(space, 0,data);break;
|
||||||
case 0x12 : wd17xx_sector_w(fdc,space, 0,data);break;
|
case 0x12 : m_fdc->sector_w(space, 0,data);break;
|
||||||
case 0x13 : wd17xx_data_w(fdc,space, 0,data);break;
|
case 0x13 : m_fdc->data_w(space, 0,data);break;
|
||||||
case 0x14 : orion_disk_control_w(space, 9, data);break;
|
case 0x14 : orion_disk_control_w(space, 9, data);break;
|
||||||
case 0x18 :
|
case 0x18 :
|
||||||
case 0x19 :
|
case 0x19 :
|
||||||
|
Loading…
Reference in New Issue
Block a user