Previous 15994 Revisions Next

r6008 Thursday 8th October, 2009 at 00:03:34 UTC by Barry Rodewald
[FMTOWNS] Hooked up PIT timer 0 interrupt.
[src/emu/machine]pic8259.c
[src/mess/drivers]fmtowns.c

src/emu/machine/pic8259.c
r6007r6008
1818
1919#define LOG_ICW      0
2020#define LOG_OCW      0
21#define LOG_GENERAL   
21#define LOG_GENERAL   1
2222
2323typedef enum
2424{
src/mess/drivers/fmtowns.c
r6007r6008
709709         memory_set_bankptr(space->machine,6,mess_ram+0xcb000);
710710      memory_set_bankptr(space->machine,7,mess_ram+0xcb000);
711711      memory_set_bankptr(space->machine,8,mess_ram+0xcc000);
712      memory_set_bankptr(space->machine,11,ROM+0x238000);
712      if(towns_system_port & 0x02)
713         memory_set_bankptr(space->machine,11,mess_ram+0xf8000);
714      else
715         memory_set_bankptr(space->machine,11,ROM+0x238000);
713716      memory_set_bankptr(space->machine,12,mess_ram+0xf8000);
714717      return;
715718   }
r6007r6008
790793   return 0x08;
791794}
792795
796static IRQ_CALLBACK( towns_irq_callback )
797{
798   const device_config* dev = devtag_get_device(device->machine,"pic8259_master");
799   return pic8259_acknowledge(dev);
800}
801
802static PIC8259_SET_INT_LINE( towns_pic_irq )
803{
804   cputag_set_input_line(device->machine,"maincpu",0,interrupt ? ASSERT_LINE : CLEAR_LINE);
805}
806
807static PIT8253_OUTPUT_CHANGED( towns_pit_out0_changed )
808{
809   const device_config* dev = devtag_get_device(device->machine,"pic8259_master");
810   pic8259_set_irq_line(dev,0,state);
811}
812
793813static ADDRESS_MAP_START(towns_mem, ADDRESS_SPACE_PROGRAM, 32)
794814  // memory map based on FM-Towns/Bochs (Bochs modified to emulate the FM-Towns)
795815  // may not be (and probably is not) correct
r6007r6008
829849  AM_RANGE(0x0040,0x0047) AM_DEVREADWRITE8("pit",pit8253_r, pit8253_w, 0x00ff00ff)
830850  AM_RANGE(0x0060,0x0063) AM_READWRITE8(towns_port60_r, towns_port60_w, 0x000000ff)
831851  AM_RANGE(0x006c,0x006f) AM_READWRITE8(towns_sys6c_r,towns_sys6c_w, 0x000000ff)
852  // 0x0070/0x0080 - CMOS RTC
832853  // DMA controllers (uPD71071)
833854  AM_RANGE(0x00a0,0x00af) AM_READWRITE8(towns_dma1_r, towns_dma1_w, 0xffffffff)
834855  AM_RANGE(0x00b0,0x00bf) AM_READWRITE8(towns_dma2_r, towns_dma2_w, 0xffffffff)
r6007r6008
881902   towns_txtvram = auto_alloc_array(machine,UINT8,0x8000);
882903   towns_serial_rom = auto_alloc_array(machine,UINT8,256/8);
883904   towns_init_serial_rom();
905   
906   cpu_set_irq_callback(cputag_get_cpu(machine,"maincpu"), towns_irq_callback);
884907}
885908
886909static MACHINE_RESET( towns )
r6007r6008
934957   {
935958      {
936959         307200,
937         NULL
960         towns_pit_out0_changed
938961      },
939962      {
940963         307200,
r6007r6008
949972
950973static const struct pic8259_interface towns_pic8259_master_config =
951974{
952   NULL
975   towns_pic_irq
953976};
954977
955978

Previous 15994 Revisions Next


© 1998-2018 The MESS Team