Previous 199869 Revisions Next

r19550 Friday 14th December, 2012 at 11:43:56 UTC by Miodrag Milanović
Made Orion use new floppy system (no whatsnew)
[src/lib/formats]smx_dsk.c
[src/mess/drivers]orion.c
[src/mess/includes]orion.h
[src/mess/machine]orion.c

trunk/src/lib/formats/smx_dsk.c
r19549r19550
5353
5454const char *smx_format::description() const
5555{
56   return "Specialist MX disk image";
56   return "Specialist MX/Orion/B2M disk image";
5757}
5858
5959const char *smx_format::extensions() const
6060{
61   return "odi,cpm";
61   return "odi,cpm,img";
6262}
6363
6464// Unverified gap sizes
6565const smx_format::format smx_format::formats[] =
6666{
67   {   //  720K 5.25 inch
67   {   //  Specialist MX/Orion/B2M disk image
6868      floppy_image::FF_525,  floppy_image::DSQD,
6969      2000, 5, 80, 2, 1024, {}, 1, {}, 100, 22, 20
7070   },
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   },
7175   {}
7276};
7377
trunk/src/mess/drivers/orion.c
r19549r19550
1515#include "sound/speaker.h"
1616#include "sound/wave.h"
1717#include "machine/mc146818.h"
18#include "machine/wd17xx.h"
19#include "imagedev/flopdrv.h"
20#include "formats/basicdsk.h"
2118#include "imagedev/cassette.h"
2219#include "imagedev/cartslot.h"
20#include "formats/smx_dsk.h"
2321#include "formats/rk_cas.h"
2422#include "includes/orion.h"
2523#include "machine/ram.h"
r19549r19550
8785   NULL
8886};
8987
90static 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]))
103LEGACY_FLOPPY_OPTIONS_END
88FLOPPY_FORMATS_MEMBER( orion_state::orion_floppy_formats )
89   FLOPPY_SMX_FORMAT
90FLOPPY_FORMATS_END
10491
105static 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};
92static SLOT_INTERFACE_START( orion_floppies )
93   SLOT_INTERFACE( "525qd", FLOPPY_525_QD )
94SLOT_INTERFACE_END
11295
113static 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
12696/* Machine driver */
12797static MACHINE_CONFIG_START( orion128, orion_state )
12898    MCFG_CPU_ADD("maincpu", I8080, 2000000)
r19549r19550
155125
156126   MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
157127
158   MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface )
128   MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
159129
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)
161134
162135   MCFG_CARTSLOT_ADD("cart")
163136
r19549r19550
218191
219192   MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
220193
221   MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface )
194   MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
222195
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)
224200
225201   MCFG_CARTSLOT_ADD("cart")
226202
r19549r19550
271247
272248   MCFG_CASSETTE_ADD( CASSETTE_TAG, orion_cassette_interface )
273249
274   MCFG_FD1793_ADD("wd1793", orion_wd17xx_interface )
250   MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8)
275251
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)
277256
278257   MCFG_CARTSLOT_ADD("cart")
279258
trunk/src/mess/machine/orion.c
r19549r19550
1212#include "cpu/i8085/i8085.h"
1313#include "imagedev/cassette.h"
1414#include "machine/mc146818.h"
15#include "machine/wd17xx.h"
1615#include "sound/speaker.h"
1716#include "sound/ay8910.h"
1817#include "includes/orion.h"
r19549r19550
165164
166165WRITE8_MEMBER(orion_state::orion_disk_control_w)
167166{
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();
169172
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);   
172176}
173177
174178READ8_MEMBER(orion_state::orion128_floppy_r)
175179{
176   device_t *fdc = machine().device("wd1793");
177
178180   switch(offset)
179181   {
180182      case 0x0   :
181      case 0x10 : return wd17xx_status_r(fdc,space, 0);
183      case 0x10 : return m_fdc->status_r(space, 0);
182184      case 0x1   :
183      case 0x11 : return wd17xx_track_r(fdc,space, 0);
185      case 0x11 : return m_fdc->track_r(space, 0);
184186      case 0x2  :
185      case 0x12 : return wd17xx_sector_r(fdc,space, 0);
187      case 0x12 : return m_fdc->sector_r(space, 0);
186188      case 0x3  :
187      case 0x13 : return wd17xx_data_r(fdc,space, 0);
189      case 0x13 : return m_fdc->data_r(space, 0);
188190   }
189191   return 0xff;
190192}
191193
192194WRITE8_MEMBER(orion_state::orion128_floppy_w)
193195{
194   device_t *fdc = machine().device("wd1793");
195
196196   switch(offset)
197197   {
198198      case 0x0   :
199      case 0x10 : wd17xx_command_w(fdc,space, 0,data); break;
199      case 0x10 : m_fdc->cmd_w(space, 0,data); break;
200200      case 0x1   :
201      case 0x11 : wd17xx_track_w(fdc,space, 0,data);break;
201      case 0x11 : m_fdc->track_w(space, 0,data);break;
202202      case 0x2  :
203      case 0x12 : wd17xx_sector_w(fdc,space, 0,data);break;
203      case 0x12 : m_fdc->sector_w(space, 0,data);break;
204204      case 0x3  :
205      case 0x13 : wd17xx_data_w(fdc,space, 0,data);break;
205      case 0x13 : m_fdc->data_w(space, 0,data);break;
206206      case 0x4  :
207207      case 0x14 :
208208      case 0x20 : orion_disk_control_w(space, offset, data);break;
r19549r19550
541541
542542READ8_MEMBER(orion_state::orionpro_io_r)
543543{
544   device_t *fdc = machine().device("wd1793");
545
546544   switch (offset & 0xff)
547545   {
548546      case 0x00 : return 0x56;
r19549r19550
552550      case 0x08 : return m_orionpro_page;
553551      case 0x09 : return m_orionpro_rom2_segment;
554552      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);
559557      case 0x18 :
560558      case 0x19 :
561559      case 0x1a :
r19549r19550
575573
576574WRITE8_MEMBER(orion_state::orionpro_io_w)
577575{
578   device_t *fdc = machine().device("wd1793");
579
580576   switch (offset & 0xff)
581577   {
582578      case 0x04 : m_orionpro_ram0_segment = data; orionpro_bank_switch(machine()); break;
r19549r19550
585581      case 0x08 : m_orionpro_page = data;        orionpro_bank_switch(machine()); break;
586582      case 0x09 : m_orionpro_rom2_segment = data; orionpro_bank_switch(machine()); break;
587583      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;
592588      case 0x14 : orion_disk_control_w(space, 9, data);break;
593589      case 0x18 :
594590      case 0x19 :
trunk/src/mess/includes/orion.h
r19549r19550
77#ifndef ORION_H_
88#define ORION_H_
99
10#include "machine/wd_fdc.h"
1011#include "includes/radio86.h"
1112#include "machine/i8255.h"
1213
r19549r19550
1415{
1516public:
1617   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      { }
1821
1922   UINT8 m_orion128_video_mode;
2023   UINT8 m_orion128_video_page;
r19549r19550
3437   UINT8 m_orionpro_128_page;
3538   UINT8 m_orionpro_rom2_segment;
3639   UINT8 m_orionpro_dispatcher;
40
41   required_device<fd1793_t> m_fdc;
42
3743   DECLARE_READ8_MEMBER(orion128_system_r);
3844   DECLARE_WRITE8_MEMBER(orion128_system_w);
3945   DECLARE_READ8_MEMBER(orion128_romdisk_r);
r19549r19550
6773   DECLARE_READ8_MEMBER(orion_romdisk_porta_r);
6874   DECLARE_WRITE8_MEMBER(orion_romdisk_portb_w);
6975   DECLARE_WRITE8_MEMBER(orion_romdisk_portc_w);
76   DECLARE_FLOPPY_FORMATS( orion_floppy_formats );
7077};
7178
7279/*----------- defined in machine/orion.c -----------*/

Previous 199869 Revisions Next


© 1997-2024 The MAME Team