Previous 199869 Revisions Next

r20393 Monday 21st January, 2013 at 20:11:27 UTC by Curt Coder
(MESS) prof180x: Fixed floppy type. (nw)
[src/mess/drivers]prof180x.c
[src/mess/includes]prof180x.h

trunk/src/mess/drivers/prof180x.c
r20392r20393
2828#include "machine/upd765.h"
2929#include "includes/prof180x.h"
3030
31UINT32 prof180x_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
31UINT32 prof180x_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
3232{
3333   return 0;
3434}
3535
36void prof180x_state::bankswitch()
36
37READ8_MEMBER( prof180x_state::read )
3738{
39   UINT8 data = 0;
40
41   if (offset < 0x40000)
42   {
43
44   }
45   else
46   {
47
48   }
49/*
3850   switch ((m_mm1 << 1) | m_mm0)
3951   {
4052   case 0:
r20392r20393
5365      // bank0_r = RAM, bank0_w = RAM, bank1 = UNMAP
5466      break;
5567   }
68*/
69   return data;
5670}
5771
72WRITE8_MEMBER( prof180x_state::write )
73{
74   if (offset < 0x40000)
75   {
76
77   }
78   else
79   {
80
81   }   
82}
83
5884void prof180x_state::ls259_w(int flag, int value)
5985{
6086   switch (flag)
r20392r20393
76102
77103   case 4: // MM0
78104      m_mm0 = value;
79      bankswitch();
80105      break;
81106
82107   case 5: // RTC
r20392r20393
87112
88113   case 7: // MM1
89114      m_mm1 = value;
90      bankswitch();
91115      break;
92116   }
93117}
r20392r20393
163187/* Address Maps */
164188
165189static ADDRESS_MAP_START( prof180x_mem, AS_PROGRAM, 8, prof180x_state )
166   AM_RANGE(0x00000, 0x3ffff) AM_READ_BANK("bank0_r") AM_WRITE_BANK("bank0_w")
167   AM_RANGE(0x40000, 0x7ffff) AM_RAMBANK("bank1")
190   AM_RANGE(0x00000, 0x7ffff) AM_READWRITE(read, write)
168191ADDRESS_MAP_END
169192
170193static ADDRESS_MAP_START( prof180x_io , AS_IO, 8, prof180x_state )
171194   AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) AM_WRITE(flr_w)
172195   AM_RANGE(0x09, 0x09) AM_MASK(0xff00) AM_READ(status_r)
173
174// Seriously?
175//  AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY(FDC9268_TAG, upd765_dack_r, upd765_dack_w)
196   AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xff00) AM_DEVREADWRITE(FDC9268_TAG, upd765a_device, mdma_r, mdma_w)
176197   AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xff00) AM_DEVWRITE(CENTRONICS_TAG, centronics_device, write)
177198   AM_RANGE(0x0c, 0x0d) AM_MIRROR(0xff00) AM_DEVICE(FDC9268_TAG, upd765a_device, map)
178199ADDRESS_MAP_END
r20392r20393
185206/* Video */
186207
187208static SLOT_INTERFACE_START( prof180x_floppies )
188   SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
209   SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
189210SLOT_INTERFACE_END
190211
191212/*
192static RTC8583_INTERFCE( rtc_intf )
213static RTC8583_INTERFACE( rtc_intf )
193214{
194215    DEVCB_CPU_INPUT_LINE(HD64180_TAG, INPUT_LINE_INT2)
195216};
r20392r20393
215236
216237static MACHINE_CONFIG_START( prof180x, prof180x_state )
217238   /* basic machine hardware */
218   MCFG_CPU_ADD(HD64180_TAG, Z80, XTAL_9_216MHz) // HD64180
239   MCFG_CPU_ADD(HD64180_TAG, Z80, XTAL_9_216MHz)
219240   MCFG_CPU_PROGRAM_MAP(prof180x_mem)
220241   MCFG_CPU_IO_MAP(prof180x_io)
221242
222243   /* video hardware */
223244   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
245   MCFG_SCREEN_UPDATE_DRIVER(prof180x_state, screen_update)
224246   MCFG_SCREEN_REFRESH_RATE(50)
225247   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
226   MCFG_SCREEN_UPDATE_DRIVER(prof180x_state, screen_update)
227248   MCFG_SCREEN_SIZE(640, 480)
228249   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
229   MCFG_PALETTE_LENGTH(2)
230   MCFG_PALETTE_INIT(black_and_white)
231250
232251   /* devices */
233252   MCFG_UPD765A_ADD(FDC9268_TAG, false, true)
234   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":0", prof180x_floppies, "525hd", 0, floppy_image_device::default_floppy_formats)
235   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":1", prof180x_floppies, "525hd", 0, floppy_image_device::default_floppy_formats)
236   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":2", prof180x_floppies, "525hd", 0, floppy_image_device::default_floppy_formats)
237   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":3", prof180x_floppies, "525hd", 0, floppy_image_device::default_floppy_formats)
253   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":0", prof180x_floppies, "35dd", 0, floppy_image_device::default_floppy_formats)
254   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":1", prof180x_floppies, 0, 0, floppy_image_device::default_floppy_formats)
255   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":2", prof180x_floppies, 0, 0, floppy_image_device::default_floppy_formats)
256   MCFG_FLOPPY_DRIVE_ADD(FDC9268_TAG ":3", prof180x_floppies, 0, 0, floppy_image_device::default_floppy_formats)
238257
239258   //MCFG_RTC8583_ADD(MK3835_TAG, rtc_intf)
240259   MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
trunk/src/mess/includes/prof180x.h
r20392r20393
1919   virtual void machine_start();
2020   virtual void machine_reset();
2121
22   DECLARE_READ8_MEMBER( read );
23   DECLARE_WRITE8_MEMBER( write );
24
2225   DECLARE_WRITE8_MEMBER( flr_w );
2326   DECLARE_READ8_MEMBER( status0_r );
2427   DECLARE_READ8_MEMBER( status1_r );
2528   DECLARE_READ8_MEMBER( status_r );
2629
27   void bankswitch();
2830   void ls259_w(int flag, int value);
2931
30   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
32   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
3133
3234   int m_c0;
3335   int m_c1;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team