mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Changed b2m to use new wd1773 core, and updated core to set head signal when seek is done,system still doesn't boot (no whatsnew)
This commit is contained in:
parent
499610afbc
commit
44fd463e6c
@ -14,9 +14,10 @@
|
|||||||
#include "machine/pit8253.h"
|
#include "machine/pit8253.h"
|
||||||
#include "machine/pic8259.h"
|
#include "machine/pic8259.h"
|
||||||
#include "machine/i8251.h"
|
#include "machine/i8251.h"
|
||||||
#include "machine/wd17xx.h"
|
#include "formats/hxcmfm_dsk.h"
|
||||||
|
#include "formats/mfi_dsk.h"
|
||||||
#include "imagedev/flopdrv.h"
|
#include "imagedev/flopdrv.h"
|
||||||
#include "formats/basicdsk.h"
|
#include "machine/wd1772.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
#include "includes/b2m.h"
|
#include "includes/b2m.h"
|
||||||
|
|
||||||
@ -40,10 +41,7 @@ static ADDRESS_MAP_START( b2m_io, AS_IO, 8, b2m_state )
|
|||||||
AM_RANGE(0x14, 0x15) AM_DEVREADWRITE_LEGACY("pic8259", pic8259_r, pic8259_w )
|
AM_RANGE(0x14, 0x15) AM_DEVREADWRITE_LEGACY("pic8259", pic8259_r, pic8259_w )
|
||||||
AM_RANGE(0x18, 0x18) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
|
AM_RANGE(0x18, 0x18) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w)
|
||||||
AM_RANGE(0x19, 0x19) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
|
AM_RANGE(0x19, 0x19) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w)
|
||||||
AM_RANGE(0x1c, 0x1c) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_status_r,wd17xx_command_w)
|
AM_RANGE(0x1c, 0x1f) AM_DEVREADWRITE("wd1793", wd1773_t, read, write)
|
||||||
AM_RANGE(0x1d, 0x1d) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_track_r,wd17xx_track_w)
|
|
||||||
AM_RANGE(0x1e, 0x1e) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_sector_r,wd17xx_sector_w)
|
|
||||||
AM_RANGE(0x1f, 0x1f) AM_DEVREADWRITE_LEGACY("wd1793", wd17xx_data_r,wd17xx_data_w)
|
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( b2m_rom_io, AS_IO, 8, b2m_state )
|
static ADDRESS_MAP_START( b2m_rom_io, AS_IO, 8, b2m_state )
|
||||||
@ -175,7 +173,7 @@ static INPUT_PORTS_START( b2m )
|
|||||||
PORT_CONFSETTING( 0x01, "Color")
|
PORT_CONFSETTING( 0x01, "Color")
|
||||||
PORT_CONFSETTING( 0x00, "B/W")
|
PORT_CONFSETTING( 0x00, "B/W")
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
/*
|
||||||
static LEGACY_FLOPPY_OPTIONS_START(b2m)
|
static LEGACY_FLOPPY_OPTIONS_START(b2m)
|
||||||
LEGACY_FLOPPY_OPTION(b2m, "cpm", "Bashkiria-2M disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
LEGACY_FLOPPY_OPTION(b2m, "cpm", "Bashkiria-2M disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
|
||||||
HEADS([2])
|
HEADS([2])
|
||||||
@ -184,20 +182,18 @@ static LEGACY_FLOPPY_OPTIONS_START(b2m)
|
|||||||
SECTOR_LENGTH([1024])
|
SECTOR_LENGTH([1024])
|
||||||
FIRST_SECTOR_ID([1]))
|
FIRST_SECTOR_ID([1]))
|
||||||
LEGACY_FLOPPY_OPTIONS_END
|
LEGACY_FLOPPY_OPTIONS_END
|
||||||
|
*/
|
||||||
|
|
||||||
static const floppy_interface b2m_floppy_interface =
|
static const floppy_format_type floppy_formats[] = {
|
||||||
{
|
FLOPPY_MFM_FORMAT, FLOPPY_MFI_FORMAT,
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
DEVCB_NULL,
|
|
||||||
FLOPPY_STANDARD_5_25_DSHD,
|
|
||||||
LEGACY_FLOPPY_OPTIONS_NAME(b2m),
|
|
||||||
NULL,
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static SLOT_INTERFACE_START( b2m_floppies )
|
||||||
|
SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
|
||||||
|
SLOT_INTERFACE_END
|
||||||
|
|
||||||
|
|
||||||
/* Machine driver */
|
/* Machine driver */
|
||||||
static MACHINE_CONFIG_START( b2m, b2m_state )
|
static MACHINE_CONFIG_START( b2m, b2m_state )
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
@ -236,9 +232,10 @@ static MACHINE_CONFIG_START( b2m, b2m_state )
|
|||||||
/* uart */
|
/* uart */
|
||||||
MCFG_I8251_ADD("uart", default_i8251_interface)
|
MCFG_I8251_ADD("uart", default_i8251_interface)
|
||||||
|
|
||||||
MCFG_FD1793_ADD("wd1793", default_wd17xx_interface_2_drives )
|
MCFG_WD1773x_ADD("wd1793", XTAL_8MHz )
|
||||||
|
|
||||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(b2m_floppy_interface)
|
MCFG_FLOPPY_DRIVE_ADD("fd0", b2m_floppies, "525dd", 0, floppy_formats)
|
||||||
|
MCFG_FLOPPY_DRIVE_ADD("fd1", b2m_floppies, "525dd", 0, floppy_formats)
|
||||||
|
|
||||||
/* internal ram */
|
/* internal ram */
|
||||||
MCFG_RAM_ADD(RAM_TAG)
|
MCFG_RAM_ADD(RAM_TAG)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "machine/i8255.h"
|
#include "machine/i8255.h"
|
||||||
#include "machine/pit8253.h"
|
#include "machine/pit8253.h"
|
||||||
#include "machine/pic8259.h"
|
#include "machine/pic8259.h"
|
||||||
|
#include "machine/wd1772.h"
|
||||||
#include "sound/speaker.h"
|
#include "sound/speaker.h"
|
||||||
#include "sound/wave.h"
|
#include "sound/wave.h"
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ public:
|
|||||||
UINT8 m_vblank_state;
|
UINT8 m_vblank_state;
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
device_t *m_fdc;
|
wd1773_t *m_fdc;
|
||||||
device_t *m_pic;
|
device_t *m_pic;
|
||||||
device_t *m_speaker;
|
device_t *m_speaker;
|
||||||
DECLARE_READ8_MEMBER(b2m_keyboard_r);
|
DECLARE_READ8_MEMBER(b2m_keyboard_r);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "imagedev/cassette.h"
|
#include "imagedev/cassette.h"
|
||||||
#include "machine/i8255.h"
|
#include "machine/i8255.h"
|
||||||
#include "machine/pit8253.h"
|
#include "machine/pit8253.h"
|
||||||
#include "machine/wd17xx.h"
|
#include "machine/wd1772.h"
|
||||||
#include "machine/pic8259.h"
|
#include "machine/pic8259.h"
|
||||||
#include "machine/i8251.h"
|
#include "machine/i8251.h"
|
||||||
#include "includes/b2m.h"
|
#include "includes/b2m.h"
|
||||||
@ -206,22 +206,22 @@ WRITE8_MEMBER(b2m_state::b2m_ext_8255_portc_w)
|
|||||||
{
|
{
|
||||||
UINT8 drive = ((data >> 1) & 1) ^ 1;
|
UINT8 drive = ((data >> 1) & 1) ^ 1;
|
||||||
UINT8 side = (data & 1) ^ 1;
|
UINT8 side = (data & 1) ^ 1;
|
||||||
floppy_mon_w(floppy_get_device(machine(), 0), 1);
|
|
||||||
floppy_mon_w(floppy_get_device(machine(), 1), 1);
|
|
||||||
|
|
||||||
|
static const char *names[] = { "fd0", "fd1"};
|
||||||
|
floppy_image_device *floppy = NULL;
|
||||||
|
floppy_connector *con = machine().device<floppy_connector>(names[drive]);
|
||||||
|
if(con)
|
||||||
|
floppy = con->get_device();
|
||||||
|
|
||||||
|
floppy->mon_w(0);
|
||||||
|
m_fdc->set_floppy(floppy);
|
||||||
if (m_b2m_drive!=drive) {
|
if (m_b2m_drive!=drive) {
|
||||||
wd17xx_set_drive(m_fdc,drive);
|
|
||||||
floppy_mon_w(floppy_get_device(machine(), 0), 0);
|
|
||||||
floppy_drive_set_ready_state(floppy_get_device(machine(), 0), 1, 1);
|
|
||||||
m_b2m_drive = drive;
|
m_b2m_drive = drive;
|
||||||
}
|
}
|
||||||
|
floppy->ss_w(side);
|
||||||
if (m_b2m_side!=side) {
|
if (m_b2m_side!=side) {
|
||||||
wd17xx_set_side(m_fdc,side);
|
|
||||||
floppy_mon_w(floppy_get_device(machine(), 1), 0);
|
|
||||||
floppy_drive_set_ready_state(floppy_get_device(machine(), 1), 1, 1);
|
|
||||||
m_b2m_side = side;
|
m_b2m_side = side;
|
||||||
}
|
}
|
||||||
wd17xx_dden_w(m_fdc, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
I8255A_INTERFACE( b2m_ppi8255_interface_2 )
|
I8255A_INTERFACE( b2m_ppi8255_interface_2 )
|
||||||
@ -312,11 +312,9 @@ static void b2m_postload(b2m_state *state)
|
|||||||
void b2m_state::machine_start()
|
void b2m_state::machine_start()
|
||||||
{
|
{
|
||||||
m_pic = machine().device("pic8259");
|
m_pic = machine().device("pic8259");
|
||||||
m_fdc = machine().device("wd1793");
|
m_fdc = machine().device<wd1773_t>("wd1793");
|
||||||
m_speaker = machine().device(SPEAKER_TAG);
|
m_speaker = machine().device(SPEAKER_TAG);
|
||||||
|
|
||||||
wd17xx_set_pause_time(m_fdc,10);
|
|
||||||
|
|
||||||
/* register for state saving */
|
/* register for state saving */
|
||||||
save_item(NAME(m_b2m_8255_porta));
|
save_item(NAME(m_b2m_8255_porta));
|
||||||
save_item(NAME(m_b2m_video_scroll));
|
save_item(NAME(m_b2m_video_scroll));
|
||||||
|
@ -255,6 +255,8 @@ void wd177x_t::seek_continue()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SEEK_DONE:
|
case SEEK_DONE:
|
||||||
|
if (!has_motor()) status |= S_HLD;
|
||||||
|
|
||||||
if(command & 0x04) {
|
if(command & 0x04) {
|
||||||
sub_state = SCAN_ID;
|
sub_state = SCAN_ID;
|
||||||
counter = 0;
|
counter = 0;
|
||||||
|
@ -209,9 +209,11 @@ private:
|
|||||||
S_CRC = 0x08,
|
S_CRC = 0x08,
|
||||||
S_RNF = 0x10,
|
S_RNF = 0x10,
|
||||||
S_SPIN = 0x20,
|
S_SPIN = 0x20,
|
||||||
|
S_HLD = 0x20,
|
||||||
S_DDM = 0x20,
|
S_DDM = 0x20,
|
||||||
S_WP = 0x40,
|
S_WP = 0x40,
|
||||||
S_MON = 0x80
|
S_MON = 0x80,
|
||||||
|
S_NRDY = 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
floppy_image_device *floppy;
|
floppy_image_device *floppy;
|
||||||
|
Loading…
Reference in New Issue
Block a user