trunk/src/lib/formats/smx_dsk.c
| r19549 | r19550 | |
| 53 | 53 | |
| 54 | 54 | const char *smx_format::description() const |
| 55 | 55 | { |
| 56 | | return "Specialist MX disk image"; |
| 56 | return "Specialist MX/Orion/B2M disk image"; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | const char *smx_format::extensions() const |
| 60 | 60 | { |
| 61 | | return "odi,cpm"; |
| 61 | return "odi,cpm,img"; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | // Unverified gap sizes |
| 65 | 65 | const smx_format::format smx_format::formats[] = |
| 66 | 66 | { |
| 67 | | { // 720K 5.25 inch |
| 67 | { // Specialist MX/Orion/B2M disk image |
| 68 | 68 | floppy_image::FF_525, floppy_image::DSQD, |
| 69 | 69 | 2000, 5, 80, 2, 1024, {}, 1, {}, 100, 22, 20 |
| 70 | 70 | }, |
| 71 | { // Lucksian Key Orion disk image |
| 72 | floppy_image::FF_525, floppy_image::DSQD, |
| 73 | 2000, 9, 80, 2, 512, {}, 1, {}, 100, 22, 20 |
| 74 | }, |
| 71 | 75 | {} |
| 72 | 76 | }; |
| 73 | 77 | |
trunk/src/mess/drivers/orion.c
| r19549 | r19550 | |
| 15 | 15 | #include "sound/speaker.h" |
| 16 | 16 | #include "sound/wave.h" |
| 17 | 17 | #include "machine/mc146818.h" |
| 18 | | #include "machine/wd17xx.h" |
| 19 | | #include "imagedev/flopdrv.h" |
| 20 | | #include "formats/basicdsk.h" |
| 21 | 18 | #include "imagedev/cassette.h" |
| 22 | 19 | #include "imagedev/cartslot.h" |
| 20 | #include "formats/smx_dsk.h" |
| 23 | 21 | #include "formats/rk_cas.h" |
| 24 | 22 | #include "includes/orion.h" |
| 25 | 23 | #include "machine/ram.h" |
| r19549 | r19550 | |
| 87 | 85 | NULL |
| 88 | 86 | }; |
| 89 | 87 | |
| 90 | | static LEGACY_FLOPPY_OPTIONS_START(orion) |
| 91 | | LEGACY_FLOPPY_OPTION(orion, "odi,img", "Orion disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, |
| 92 | | HEADS([2]) |
| 93 | | TRACKS([80]) |
| 94 | | SECTORS([5]) |
| 95 | | SECTOR_LENGTH([1024]) |
| 96 | | FIRST_SECTOR_ID([1])) |
| 97 | | LEGACY_FLOPPY_OPTION(orion_lk, "odi,img", "Lucksian Key Orion disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, |
| 98 | | HEADS([2]) |
| 99 | | TRACKS([80]) |
| 100 | | SECTORS([9]) |
| 101 | | SECTOR_LENGTH([512]) |
| 102 | | FIRST_SECTOR_ID([1])) |
| 103 | | LEGACY_FLOPPY_OPTIONS_END |
| 88 | FLOPPY_FORMATS_MEMBER( orion_state::orion_floppy_formats ) |
| 89 | FLOPPY_SMX_FORMAT |
| 90 | FLOPPY_FORMATS_END |
| 104 | 91 | |
| 105 | | static const wd17xx_interface orion_wd17xx_interface = |
| 106 | | { |
| 107 | | DEVCB_LINE_VCC, |
| 108 | | DEVCB_NULL, |
| 109 | | DEVCB_NULL, |
| 110 | | { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3 } |
| 111 | | }; |
| 92 | static SLOT_INTERFACE_START( orion_floppies ) |
| 93 | SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) |
| 94 | SLOT_INTERFACE_END |
| 112 | 95 | |
| 113 | | static const floppy_interface orion_floppy_interface = |
| 114 | | { |
| 115 | | DEVCB_NULL, |
| 116 | | DEVCB_NULL, |
| 117 | | DEVCB_NULL, |
| 118 | | DEVCB_NULL, |
| 119 | | DEVCB_NULL, |
| 120 | | FLOPPY_STANDARD_5_25_DSHD, |
| 121 | | LEGACY_FLOPPY_OPTIONS_NAME(orion), |
| 122 | | NULL, |
| 123 | | NULL |
| 124 | | }; |
| 125 | | |
| 126 | 96 | /* Machine driver */ |
| 127 | 97 | static MACHINE_CONFIG_START( orion128, orion_state ) |
| 128 | 98 | MCFG_CPU_ADD("maincpu", I8080, 2000000) |
| r19549 | r19550 | |
| 155 | 125 | |
| 156 | 126 | MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface ) |
| 157 | 127 | |
| 158 | | MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface ) |
| 128 | MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8) |
| 159 | 129 | |
| 160 | | MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(orion_floppy_interface) |
| 130 | MCFG_FLOPPY_DRIVE_ADD("fd0", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 131 | MCFG_FLOPPY_DRIVE_ADD("fd1", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 132 | MCFG_FLOPPY_DRIVE_ADD("fd2", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 133 | MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 161 | 134 | |
| 162 | 135 | MCFG_CARTSLOT_ADD("cart") |
| 163 | 136 | |
| r19549 | r19550 | |
| 218 | 191 | |
| 219 | 192 | MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface ) |
| 220 | 193 | |
| 221 | | MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface ) |
| 194 | MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8) |
| 222 | 195 | |
| 223 | | MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(orion_floppy_interface) |
| 196 | MCFG_FLOPPY_DRIVE_ADD("fd0", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 197 | MCFG_FLOPPY_DRIVE_ADD("fd1", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 198 | MCFG_FLOPPY_DRIVE_ADD("fd2", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 199 | MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 224 | 200 | |
| 225 | 201 | MCFG_CARTSLOT_ADD("cart") |
| 226 | 202 | |
| r19549 | r19550 | |
| 271 | 247 | |
| 272 | 248 | MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface ) |
| 273 | 249 | |
| 274 | | MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface ) |
| 250 | MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8) |
| 275 | 251 | |
| 276 | | MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(orion_floppy_interface) |
| 252 | MCFG_FLOPPY_DRIVE_ADD("fd0", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 253 | MCFG_FLOPPY_DRIVE_ADD("fd1", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 254 | MCFG_FLOPPY_DRIVE_ADD("fd2", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 255 | MCFG_FLOPPY_DRIVE_ADD("fd3", orion_floppies, "525qd", 0, orion_state::orion_floppy_formats) |
| 277 | 256 | |
| 278 | 257 | MCFG_CARTSLOT_ADD("cart") |
| 279 | 258 | |
trunk/src/mess/machine/orion.c
| r19549 | r19550 | |
| 12 | 12 | #include "cpu/i8085/i8085.h" |
| 13 | 13 | #include "imagedev/cassette.h" |
| 14 | 14 | #include "machine/mc146818.h" |
| 15 | | #include "machine/wd17xx.h" |
| 16 | 15 | #include "sound/speaker.h" |
| 17 | 16 | #include "sound/ay8910.h" |
| 18 | 17 | #include "includes/orion.h" |
| r19549 | r19550 | |
| 165 | 164 | |
| 166 | 165 | WRITE8_MEMBER(orion_state::orion_disk_control_w) |
| 167 | 166 | { |
| 168 | | device_t *fdc = machine().device("wd1793"); |
| 167 | static const char *names[] = { "fd0", "fd1", "fd2", "fd3"}; |
| 168 | floppy_image_device *floppy = NULL; |
| 169 | floppy_connector *con = machine().device<floppy_connector>(names[data & 3]); |
| 170 | if(con) |
| 171 | floppy = con->get_device(); |
| 169 | 172 | |
| 170 | | wd17xx_set_side(fdc,((data & 0x10) >> 4) ^ 1); |
| 171 | | wd17xx_set_drive(fdc,data & 3); |
| 173 | m_fdc->set_floppy(floppy); |
| 174 | floppy->mon_w(0); |
| 175 | floppy->ss_w(((data & 0x10) >> 4) ^ 1); |
| 172 | 176 | } |
| 173 | 177 | |
| 174 | 178 | READ8_MEMBER(orion_state::orion128_floppy_r) |
| 175 | 179 | { |
| 176 | | device_t *fdc = machine().device("wd1793"); |
| 177 | | |
| 178 | 180 | switch(offset) |
| 179 | 181 | { |
| 180 | 182 | case 0x0 : |
| 181 | | case 0x10 : return wd17xx_status_r(fdc,space, 0); |
| 183 | case 0x10 : return m_fdc->status_r(space, 0); |
| 182 | 184 | case 0x1 : |
| 183 | | case 0x11 : return wd17xx_track_r(fdc,space, 0); |
| 185 | case 0x11 : return m_fdc->track_r(space, 0); |
| 184 | 186 | case 0x2 : |
| 185 | | case 0x12 : return wd17xx_sector_r(fdc,space, 0); |
| 187 | case 0x12 : return m_fdc->sector_r(space, 0); |
| 186 | 188 | case 0x3 : |
| 187 | | case 0x13 : return wd17xx_data_r(fdc,space, 0); |
| 189 | case 0x13 : return m_fdc->data_r(space, 0); |
| 188 | 190 | } |
| 189 | 191 | return 0xff; |
| 190 | 192 | } |
| 191 | 193 | |
| 192 | 194 | WRITE8_MEMBER(orion_state::orion128_floppy_w) |
| 193 | 195 | { |
| 194 | | device_t *fdc = machine().device("wd1793"); |
| 195 | | |
| 196 | 196 | switch(offset) |
| 197 | 197 | { |
| 198 | 198 | case 0x0 : |
| 199 | | case 0x10 : wd17xx_command_w(fdc,space, 0,data); break; |
| 199 | case 0x10 : m_fdc->cmd_w(space, 0,data); break; |
| 200 | 200 | case 0x1 : |
| 201 | | case 0x11 : wd17xx_track_w(fdc,space, 0,data);break; |
| 201 | case 0x11 : m_fdc->track_w(space, 0,data);break; |
| 202 | 202 | case 0x2 : |
| 203 | | case 0x12 : wd17xx_sector_w(fdc,space, 0,data);break; |
| 203 | case 0x12 : m_fdc->sector_w(space, 0,data);break; |
| 204 | 204 | case 0x3 : |
| 205 | | case 0x13 : wd17xx_data_w(fdc,space, 0,data);break; |
| 205 | case 0x13 : m_fdc->data_w(space, 0,data);break; |
| 206 | 206 | case 0x4 : |
| 207 | 207 | case 0x14 : |
| 208 | 208 | case 0x20 : orion_disk_control_w(space, offset, data);break; |
| r19549 | r19550 | |
| 541 | 541 | |
| 542 | 542 | READ8_MEMBER(orion_state::orionpro_io_r) |
| 543 | 543 | { |
| 544 | | device_t *fdc = machine().device("wd1793"); |
| 545 | | |
| 546 | 544 | switch (offset & 0xff) |
| 547 | 545 | { |
| 548 | 546 | case 0x00 : return 0x56; |
| r19549 | r19550 | |
| 552 | 550 | case 0x08 : return m_orionpro_page; |
| 553 | 551 | case 0x09 : return m_orionpro_rom2_segment; |
| 554 | 552 | case 0x0a : return m_orionpro_dispatcher; |
| 555 | | case 0x10 : return wd17xx_status_r(fdc,space, 0); |
| 556 | | case 0x11 : return wd17xx_track_r(fdc,space, 0); |
| 557 | | case 0x12 : return wd17xx_sector_r(fdc,space, 0); |
| 558 | | case 0x13 : return wd17xx_data_r(fdc,space, 0); |
| 553 | case 0x10 : return m_fdc->status_r(space, 0); |
| 554 | case 0x11 : return m_fdc->track_r(space, 0); |
| 555 | case 0x12 : return m_fdc->sector_r(space, 0); |
| 556 | case 0x13 : return m_fdc->data_r(space, 0); |
| 559 | 557 | case 0x18 : |
| 560 | 558 | case 0x19 : |
| 561 | 559 | case 0x1a : |
| r19549 | r19550 | |
| 575 | 573 | |
| 576 | 574 | WRITE8_MEMBER(orion_state::orionpro_io_w) |
| 577 | 575 | { |
| 578 | | device_t *fdc = machine().device("wd1793"); |
| 579 | | |
| 580 | 576 | switch (offset & 0xff) |
| 581 | 577 | { |
| 582 | 578 | case 0x04 : m_orionpro_ram0_segment = data; orionpro_bank_switch(machine()); break; |
| r19549 | r19550 | |
| 585 | 581 | case 0x08 : m_orionpro_page = data; orionpro_bank_switch(machine()); break; |
| 586 | 582 | case 0x09 : m_orionpro_rom2_segment = data; orionpro_bank_switch(machine()); break; |
| 587 | 583 | case 0x0a : m_orionpro_dispatcher = data; orionpro_bank_switch(machine()); break; |
| 588 | | case 0x10 : wd17xx_command_w(fdc,space, 0,data); break; |
| 589 | | case 0x11 : wd17xx_track_w(fdc,space, 0,data);break; |
| 590 | | case 0x12 : wd17xx_sector_w(fdc,space, 0,data);break; |
| 591 | | case 0x13 : wd17xx_data_w(fdc,space, 0,data);break; |
| 584 | case 0x10 : m_fdc->cmd_w(space, 0,data); break; |
| 585 | case 0x11 : m_fdc->track_w(space, 0,data);break; |
| 586 | case 0x12 : m_fdc->sector_w(space, 0,data);break; |
| 587 | case 0x13 : m_fdc->data_w(space, 0,data);break; |
| 592 | 588 | case 0x14 : orion_disk_control_w(space, 9, data);break; |
| 593 | 589 | case 0x18 : |
| 594 | 590 | case 0x19 : |
trunk/src/mess/includes/orion.h
| r19549 | r19550 | |
| 7 | 7 | #ifndef ORION_H_ |
| 8 | 8 | #define ORION_H_ |
| 9 | 9 | |
| 10 | #include "machine/wd_fdc.h" |
| 10 | 11 | #include "includes/radio86.h" |
| 11 | 12 | #include "machine/i8255.h" |
| 12 | 13 | |
| r19549 | r19550 | |
| 14 | 15 | { |
| 15 | 16 | public: |
| 16 | 17 | orion_state(const machine_config &mconfig, device_type type, const char *tag) |
| 17 | | : radio86_state(mconfig, type, tag) { } |
| 18 | : radio86_state(mconfig, type, tag), |
| 19 | m_fdc(*this, "fd1793") |
| 20 | { } |
| 18 | 21 | |
| 19 | 22 | UINT8 m_orion128_video_mode; |
| 20 | 23 | UINT8 m_orion128_video_page; |
| r19549 | r19550 | |
| 34 | 37 | UINT8 m_orionpro_128_page; |
| 35 | 38 | UINT8 m_orionpro_rom2_segment; |
| 36 | 39 | UINT8 m_orionpro_dispatcher; |
| 40 | |
| 41 | required_device<fd1793_t> m_fdc; |
| 42 | |
| 37 | 43 | DECLARE_READ8_MEMBER(orion128_system_r); |
| 38 | 44 | DECLARE_WRITE8_MEMBER(orion128_system_w); |
| 39 | 45 | DECLARE_READ8_MEMBER(orion128_romdisk_r); |
| r19549 | r19550 | |
| 67 | 73 | DECLARE_READ8_MEMBER(orion_romdisk_porta_r); |
| 68 | 74 | DECLARE_WRITE8_MEMBER(orion_romdisk_portb_w); |
| 69 | 75 | DECLARE_WRITE8_MEMBER(orion_romdisk_portc_w); |
| 76 | DECLARE_FLOPPY_FORMATS( orion_floppy_formats ); |
| 70 | 77 | }; |
| 71 | 78 | |
| 72 | 79 | /*----------- defined in machine/orion.c -----------*/ |