src/mess/drivers/fmtowns.c
| r6007 | r6008 | |
| 709 | 709 | memory_set_bankptr(space->machine,6,mess_ram+0xcb000); |
| 710 | 710 | memory_set_bankptr(space->machine,7,mess_ram+0xcb000); |
| 711 | 711 | 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); |
| 713 | 716 | memory_set_bankptr(space->machine,12,mess_ram+0xf8000); |
| 714 | 717 | return; |
| 715 | 718 | } |
| r6007 | r6008 | |
| 790 | 793 | return 0x08; |
| 791 | 794 | } |
| 792 | 795 | |
| 796 | static 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 | |
| 802 | static PIC8259_SET_INT_LINE( towns_pic_irq ) |
| 803 | { |
| 804 | cputag_set_input_line(device->machine,"maincpu",0,interrupt ? ASSERT_LINE : CLEAR_LINE); |
| 805 | } |
| 806 | |
| 807 | static 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 | |
| 793 | 813 | static ADDRESS_MAP_START(towns_mem, ADDRESS_SPACE_PROGRAM, 32) |
| 794 | 814 | // memory map based on FM-Towns/Bochs (Bochs modified to emulate the FM-Towns) |
| 795 | 815 | // may not be (and probably is not) correct |
| r6007 | r6008 | |
| 829 | 849 | AM_RANGE(0x0040,0x0047) AM_DEVREADWRITE8("pit",pit8253_r, pit8253_w, 0x00ff00ff) |
| 830 | 850 | AM_RANGE(0x0060,0x0063) AM_READWRITE8(towns_port60_r, towns_port60_w, 0x000000ff) |
| 831 | 851 | AM_RANGE(0x006c,0x006f) AM_READWRITE8(towns_sys6c_r,towns_sys6c_w, 0x000000ff) |
| 852 | // 0x0070/0x0080 - CMOS RTC |
| 832 | 853 | // DMA controllers (uPD71071) |
| 833 | 854 | AM_RANGE(0x00a0,0x00af) AM_READWRITE8(towns_dma1_r, towns_dma1_w, 0xffffffff) |
| 834 | 855 | AM_RANGE(0x00b0,0x00bf) AM_READWRITE8(towns_dma2_r, towns_dma2_w, 0xffffffff) |
| r6007 | r6008 | |
| 881 | 902 | towns_txtvram = auto_alloc_array(machine,UINT8,0x8000); |
| 882 | 903 | towns_serial_rom = auto_alloc_array(machine,UINT8,256/8); |
| 883 | 904 | towns_init_serial_rom(); |
| 905 | |
| 906 | cpu_set_irq_callback(cputag_get_cpu(machine,"maincpu"), towns_irq_callback); |
| 884 | 907 | } |
| 885 | 908 | |
| 886 | 909 | static MACHINE_RESET( towns ) |
| r6007 | r6008 | |
| 934 | 957 | { |
| 935 | 958 | { |
| 936 | 959 | 307200, |
| 937 | | NULL |
| 960 | towns_pit_out0_changed |
| 938 | 961 | }, |
| 939 | 962 | { |
| 940 | 963 | 307200, |
| r6007 | r6008 | |
| 949 | 972 | |
| 950 | 973 | static const struct pic8259_interface towns_pic8259_master_config = |
| 951 | 974 | { |
| 952 | | NULL |
| 975 | towns_pic_irq |
| 953 | 976 | }; |
| 954 | 977 | |
| 955 | 978 | |