Previous 15994 Revisions Next

r14152 Tuesday 24th January, 2012 at 11:14:25 UTC by Barry Rodewald
fmtowns: Made I/O bus active low for unmapped ports. This fixes sound output under Windows 3.1. (no whatsnew)
[src/mess/drivers]fmtowns.c
[src/mess/includes]fmtowns.h
[src/mess/video]fmtowns.c

src/mess/video/fmtowns.c
r14151r14152
265265         else
266266            return 0x00;
267267      case 0x06:
268         if(m_video.towns_vblank_flag != 0)
269            return 0x10;
270         else
271            return 0x00;
268//         if(m_video.towns_vblank_flag != 0)
269//            return 0x10;
270//         else
271//            return 0x00;
272272      case 0x16:  // Kanji character data
273273         return ROM[(m_video.towns_kanji_offset << 1) + 0x180000];
274274      case 0x17:  // Kanji character data
r14151r14152
574574   logerror("VGA: VRAM wplane select (I/O) = 0x%02x\n",m_video.towns_vram_wplane);
575575}
576576
577READ32_MEMBER(towns_state::towns_video_unknown_r)
578{
579   return 0x00000000;
580}
581
577582/*
578583 *  Sprite RAM, low memory
579584 *  Writing to 0xc8xxx or 0xcaxxx activates TVRAM
src/mess/includes/fmtowns.h
r14151r14152
4040WRITE8_HANDLER(towns_video_fd90_w);
4141READ8_HANDLER(towns_video_ff81_r);
4242WRITE8_HANDLER(towns_video_ff81_w);
43READ32_HANDLER(towns_video_unknown_r);
4344READ8_HANDLER(towns_spriteram_low_r);
4445WRITE8_HANDLER(towns_spriteram_low_w);
4546READ8_HANDLER(towns_spriteram_r);
r14151r14152
246247   DECLARE_READ8_MEMBER(towns_video_fd90_r);
247248   DECLARE_WRITE8_MEMBER(towns_video_fd90_w);
248249   DECLARE_READ8_MEMBER(towns_video_ff81_r);
250   DECLARE_READ32_MEMBER(towns_video_unknown_r);
249251   DECLARE_WRITE8_MEMBER(towns_video_ff81_w);
250252   DECLARE_READ8_MEMBER(towns_spriteram_low_r);
251253   DECLARE_WRITE8_MEMBER(towns_spriteram_low_w);
src/mess/drivers/fmtowns.c
r14151r14152
232232      case 0x05:
233233         logerror("SYS: port 0x25 read\n");
234234         return 0x00;
235      case 0x06:
235/*      case 0x06:
236         count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double();
237         return count & 0xff;
238      case 0x07:
239         count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double();
240         return (count >> 8) & 0xff;
241*/      case 0x06:
236242         //logerror("SYS: (0x26) timer read\n");
237243         return m_freerun_timer;
238244      case 0x07:
r14151r14152
358364
359365WRITE8_MEMBER(towns_state::towns_sys6c_w)
360366{
361   // halts the CPU for a period of time (exact length unknown)
367   // halts the CPU for 1 microsecond
362368   device_set_input_line(m_maincpu,INPUT_LINE_HALT,ASSERT_LINE);
363369   m_towns_wait_timer->adjust(attotime::from_usec(1),0,attotime::never);
364370}
r14151r14152
21102116static ADDRESS_MAP_START( towns_io , AS_IO, 32, towns_state)
21112117  // I/O ports derived from FM Towns/Bochs, these are specific to the FM Towns
21122118  // System ports
2119  ADDRESS_MAP_UNMAP_HIGH
21132120  AM_RANGE(0x0000,0x0003) AM_DEVREADWRITE8_LEGACY("pic8259_master", pic8259_r, pic8259_w, 0x00ff00ff)
21142121  AM_RANGE(0x0010,0x0013) AM_DEVREADWRITE8_LEGACY("pic8259_slave", pic8259_r, pic8259_w, 0x00ff00ff)
21152122  AM_RANGE(0x0020,0x0033) AM_READWRITE8(towns_system_r,towns_system_w, 0xffffffff)
r14151r14152
21272134  // Floppy controller
21282135  AM_RANGE(0x0200,0x020f) AM_READWRITE8(towns_floppy_r, towns_floppy_w, 0xffffffff)
21292136  // CRTC / Video
2130  AM_RANGE(0x0400,0x0403) AM_NOP  // R/O (0x400)
2137  AM_RANGE(0x0400,0x0403) AM_READ(towns_video_unknown_r)  // R/O (0x400)
21312138  AM_RANGE(0x0404,0x0407) AM_READWRITE(towns_video_404_r, towns_video_404_w)  // R/W (0x404)
21322139  AM_RANGE(0x0440,0x045f) AM_READWRITE8(towns_video_440_r, towns_video_440_w, 0xffffffff)
21332140  // System port
r14151r14152
21532160  // CMOS
21542161  AM_RANGE(0x3000,0x3fff) AM_READWRITE8(towns_cmos8_r, towns_cmos8_w,0x00ff00ff)
21552162  // Something (MS-DOS wants this 0x41ff to be 1)
2156  AM_RANGE(0x41fc,0x41ff) AM_READ8(towns_41ff_r,0xff000000)
2163//  AM_RANGE(0x41fc,0x41ff) AM_READ8(towns_41ff_r,0xff000000)
21572164  // CRTC / Video (again)
21582165  AM_RANGE(0xfd90,0xfda3) AM_READWRITE8(towns_video_fd90_r, towns_video_fd90_w, 0xffffffff)
21592166  AM_RANGE(0xff80,0xffff) AM_READWRITE8(towns_video_cff80_r,towns_video_cff80_w,0xffffffff)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team