Previous 199869 Revisions Next

r26482 Monday 2nd December, 2013 at 17:32:40 UTC by Osso
pc_t1t.c: small update (nw)
[src/mess/drivers]pc.c
[src/mess/video]pc_t1t.c pc_t1t.h

trunk/src/mess/video/pc_t1t.c
r26481r26482
5353
5454void pcvideo_t1000_device::device_start()
5555{
56   int buswidth;
57   address_space &space = machine().firstcpu->space(AS_PROGRAM);
58   address_space &spaceio = machine().firstcpu->space(AS_IO);
59
6056   m_chr_gen = machine().root_device().memregion("gfx1")->base();
6157   m_update_row = NULL;
6258   m_bank = 0;
6359   m_chr_size = 1;
6460   m_ra_offset = 256;
65
66   buswidth = machine().firstcpu->space_config(AS_PROGRAM)->m_databus_width;
67   switch(buswidth)
68   {
69      case 8:
70         space.install_readwrite_handler(0xb8000, 0xbffff, read8_delegate(FUNC(pcvideo_t1000_device::videoram_r), this), write8_delegate(FUNC(pcvideo_t1000_device::videoram_w), this));
71         spaceio.install_readwrite_handler(0x3d0, 0x3df, read8_delegate(FUNC(pc_t1t_device::read), this), write8_delegate(FUNC(pcvideo_t1000_device::write), this));
72         break;
73
74      case 16:
75         space.install_readwrite_handler(0xb8000, 0xbffff, read8_delegate(FUNC(pcvideo_t1000_device::videoram_r), this), write8_delegate(FUNC(pcvideo_t1000_device::videoram_w), this), 0xffff );
76         spaceio.install_readwrite_handler(0x3d0, 0x3df, read8_delegate(FUNC(pc_t1t_device::read), this), write8_delegate(FUNC(pcvideo_t1000_device::write), this), 0xffff );
77         break;
78
79      default:
80         fatalerror("T1T: Bus width %d not supported\n", buswidth);
81         break;
82   }
8361}
8462
8563
8664void pcvideo_pcjr_device::device_start()
8765{
88   int buswidth;
89   address_space &spaceio = machine().firstcpu->space(AS_IO);
90
9166   m_chr_gen = machine().root_device().memregion("gfx1")->base();
9267   m_update_row = NULL;
9368   m_bank = 0;
r26481r26482
9873      m_jxkanji = machine().root_device().memregion("kanji")->base();
9974   else
10075      m_jxkanji = NULL;
101
102   buswidth = machine().firstcpu->space_config(AS_PROGRAM)->m_databus_width;
103   switch(buswidth)
104   {
105      case 8:
106         spaceio.install_readwrite_handler(0x3d0, 0x3df, read8_delegate(FUNC(pc_t1t_device::read), this), write8_delegate(FUNC(pcvideo_pcjr_device::write), this));
107         break;
108
109      default:
110         fatalerror("PCJR: Bus width %d not supported\n", buswidth);
111         break;
112   }
11376}
11477
11578
trunk/src/mess/video/pc_t1t.h
r26481r26482
7979   // construction/destruction
8080   pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
8181
82   DECLARE_WRITE8_MEMBER( write );
83   DECLARE_READ8_MEMBER( videoram_r );
84   DECLARE_WRITE8_MEMBER( videoram_w );
8285   DECLARE_WRITE_LINE_MEMBER( t1000_vsync_changed );
8386
8487protected:
r26481r26482
8790   
8891private:
8992   UINT8 *m_t1_displayram;
90   
91   DECLARE_WRITE8_MEMBER( write );
92   DECLARE_READ8_MEMBER( videoram_r );
93   DECLARE_WRITE8_MEMBER( videoram_w );
9493   void mode_switch( void );
9594   void vga_data_w(int data);
9695   void bank_w(int data);
r26481r26482
108107   // construction/destruction
109108   pcvideo_pcjr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
110109
110   DECLARE_WRITE8_MEMBER( write );
111111   DECLARE_WRITE_LINE_MEMBER( pcjr_vsync_changed );
112112   
113113   UINT8   *m_jxkanji;
r26481r26482
117117   virtual void device_start();
118118
119119private:
120   DECLARE_WRITE8_MEMBER( write );
121120   void pc_pcjr_mode_switch();
122121   void pc_pcjr_vga_data_w(int data);
123122   void pc_pcjr_bank_w(int data);
trunk/src/mess/drivers/pc.c
r26481r26482
374374   AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
375375   AM_RANGE(0xa0000, 0xaffff) AM_RAM
376376   AM_RANGE(0xb0000, 0xb7fff) AM_NOP
377   AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w);
377378   AM_RANGE(0xc0000, 0xc7fff) AM_NOP
378379   AM_RANGE(0xc8000, 0xc9fff) AM_ROM
379380   AM_RANGE(0xca000, 0xcffff) AM_NOP
r26481r26482
394395   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE("ins8250_1", ins8250_device, ins8250_r, ins8250_w)
395396   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r,         pc_t1t_p37x_w)
396397   AM_RANGE(0x03bc, 0x03be) AM_DEVREADWRITE("lpt_0", pc_lpt_device, read, write)
398   AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE("pcvideo_t1000", pcvideo_t1000_device, read, write)
397399   AM_RANGE(0x03f0, 0x03f7) AM_DEVICE("fdc", pc_fdc_interface, map)
398400   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE("ins8250_0", ins8250_device, ins8250_r, ins8250_w)
399401ADDRESS_MAP_END
r26481r26482
404406   AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
405407   AM_RANGE(0xa0000, 0xaffff) AM_RAM
406408   AM_RANGE(0xb0000, 0xb7fff) AM_NOP
409   AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w, 0xffff)
407410   AM_RANGE(0xc0000, 0xc7fff) AM_NOP
408411   AM_RANGE(0xc8000, 0xc9fff) AM_ROM
409412   AM_RANGE(0xca000, 0xcffff) AM_NOP
r26481r26482
423426   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
424427   AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r,            pc_t1t_p37x_w, 0xffff)
425428   AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_device, read, write, 0xffff)
429   AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, read, write, 0xffff)
426430   AM_RANGE(0x03f0, 0x03f7) AM_DEVICE8("fdc", pc_fdc_interface, map, 0xffff)
427431   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ins8250_0", ins8250_device, ins8250_r, ins8250_w, 0xffff)
428432   AM_RANGE(0xffea, 0xffeb) AM_READWRITE8(tandy1000_bank_r, tandy1000_bank_w, 0xffff)
r26481r26482
435439   AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10")
436440   AM_RANGE(0xa0000, 0xaffff) AM_RAM
437441   AM_RANGE(0xb0000, 0xb7fff) AM_NOP
442   AM_RANGE(0xb8000, 0xbffff) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, videoram_r, videoram_w, 0xffff)
438443   AM_RANGE(0xc0000, 0xc7fff) AM_NOP
439444   AM_RANGE(0xc8000, 0xc9fff) AM_ROM
440445   AM_RANGE(0xca000, 0xcffff) AM_NOP
r26481r26482
455460   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
456461   AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r,           pc_t1t_p37x_w, 0xffff)
457462   AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8("lpt_0", pc_lpt_device, read, write, 0xffff)
463   AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE8("pcvideo_t1000", pcvideo_t1000_device, read, write, 0xffff)
458464   AM_RANGE(0x03f0, 0x03f7) AM_DEVICE8("fdc", pc_fdc_interface, map, 0xffff)
459465   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ins8250_0", ins8250_device, ins8250_r, ins8250_w, 0xffff)
460466ADDRESS_MAP_END
r26481r26482
487493   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE("ins8250_1", ins8250_device, ins8250_r, ins8250_w)
488494   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r,         pc_t1t_p37x_w)
489495   AM_RANGE(0x03bc, 0x03be) AM_DEVREADWRITE("lpt_0", pc_lpt_device, read, write)
496   AM_RANGE(0x03d0, 0x03df) AM_DEVREADWRITE("pcvideo_pcjr", pcvideo_pcjr_device, read, write)
490497   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE("ins8250_0", ins8250_device, ins8250_r, ins8250_w)
491498ADDRESS_MAP_END
492499

Previous 199869 Revisions Next


© 1997-2024 The MAME Team