src/mess/video/x68k.c
| r843 | r844 | |
| 248 | 248 | if(val == 1) // VBlank on |
| 249 | 249 | { |
| 250 | 250 | mfp_timer_a_callback(machine, 0); |
| 251 | | if(!(sys.mfp.aer & 0x10)) |
| 251 | // if(!(sys.mfp.aer & 0x10)) |
| 252 | 252 | mfp_trigger_irq(MFP_IRQ_GPIP4); // V-DISP |
| 253 | 253 | vblank_line = sys.crtc.reg[6]; |
| 254 | 254 | if(vblank_line > sys.crtc.reg[4]) |
| r843 | r844 | |
| 262 | 262 | } |
| 263 | 263 | if(val == 0) // VBlank off |
| 264 | 264 | { |
| 265 | | if(sys.mfp.aer & 0x10) |
| 266 | | mfp_trigger_irq(MFP_IRQ_GPIP4); // V-DISP |
| 265 | // if(sys.mfp.aer & 0x10) |
| 266 | // mfp_trigger_irq(MFP_IRQ_GPIP4); // V-DISP |
| 267 | 267 | vblank_line = sys.crtc.reg[7]; |
| 268 | 268 | if(sys.crtc.height == 256) |
| 269 | 269 | irq_time = video_screen_get_time_until_pos(0,vblank_line / 2,2); |
| r843 | r844 | |
| 954 | 954 | x68k_draw_gfx(bitmap); |
| 955 | 955 | |
| 956 | 956 | // Sprite / BG Tiles |
| 957 | | if(priority == sys.video.sprite_pri && (x68k_spritereg[0x404] & 0x0200) && (sys.video.reg[2] & 0x0040)) |
| 957 | if(priority == sys.video.sprite_pri /*&& (x68k_spritereg[0x404] & 0x0200)*/ && (sys.video.reg[2] & 0x0040)) |
| 958 | 958 | { |
| 959 | 959 | x68k_draw_sprites(bitmap,1); |
| 960 | 960 | if((x68k_spritereg[0x404] & 0x0008)) |
| r843 | r844 | |
| 973 | 973 | } |
| 974 | 974 | } |
| 975 | 975 | x68k_draw_sprites(bitmap,2); |
| 976 | | if(x68k_spritereg[0x404] & 0x0001) |
| 976 | if((x68k_spritereg[0x404] & 0x0001)) |
| 977 | 977 | { |
| 978 | 978 | if((x68k_spritereg[0x404] & 0x0006) == 0x02) // BG0 TXSEL |
| 979 | 979 | { |
src/mess/drivers/x68k.c
| r843 | r844 | |
| 75 | 75 | ...plus a number of custom chips for video and other stuff... |
| 76 | 76 | |
| 77 | 77 | |
| 78 | | *** Current status (16/01/07) |
| 78 | *** Current status (12/08/07) |
| 79 | 79 | FDC/FDD : Uses the uPD765A code with a small patch to handle Sense Interrupt Status being invalid if not in seek mode |
| 80 | 80 | Extra uPD72065 commands not yet implemented, although I have yet to see them used. |
| 81 | 81 | |
| r843 | r844 | |
| 86 | 86 | |
| 87 | 87 | HDC/HDD : SASI and SCSI are not implemented, not a requirement at this point. |
| 88 | 88 | |
| 89 | | RTC : Needs a lot of work, but relatively unimportant at this point. |
| 89 | RTC : Seems to work. (Tested using SX-Windows' Timer application) |
| 90 | 90 | |
| 91 | 91 | DMA : FDD reading mostly works, other channels should work for effective memory copying (channel 2, often |
| 92 | 92 | used to copy data to video RAM or the palette in the background). |
| 93 | 93 | |
| 94 | 94 | Sound : FM works, ADPCM is unimplemented as yet. |
| 95 | 95 | |
| 96 | | SCC : Unimplemented as yet. |
| 96 | SCC : Works enough to get the mouse running |
| 97 | 97 | |
| 98 | 98 | Video : Text mode works, but is rather slow, especially scrolling up (uses multple "raster copy" commands). |
| 99 | 99 | 16 and 256 graphic layers work, but colours on a 65,536 colour layer are wrong. |
| r843 | r844 | |
| 117 | 117 | Baraduke: Corrupt background, locks up on demo mode. |
| 118 | 118 | Viewpoint: Corrupt graphics on title screen, phantom movements on title screen, corrupt sprites, locks up. |
| 119 | 119 | Mr. Do: Locks up or resets after some time. Happens on Mr Do vs. Unicorns, as well. |
| 120 | | Tetris: Black dots over screen. |
| 120 | Tetris: Black dots over screen (text layer). |
| 121 | 121 | Parodius Da!: Water isn't animated (beginning of stage 1), black squares (raster effects?) |
| 122 | 122 | |
| 123 | 123 | |
| r843 | r844 | |
| 1427 | 1427 | AM_RANGE(0xeb0000, 0xeb7fff) AM_READWRITE(x68k_spritereg_r, x68k_spritereg_w) |
| 1428 | 1428 | AM_RANGE(0xeb8000, 0xebffff) AM_READWRITE(x68k_spriteram_r, x68k_spriteram_w) |
| 1429 | 1429 | AM_RANGE(0xec0000, 0xecffff) AM_NOP // User I/O |
| 1430 | | AM_RANGE(0xed0000, 0xed3fff) AM_READWRITE(x68k_sram_r, x68k_sram_w) AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) |
| 1430 | // AM_RANGE(0xed0000, 0xed3fff) AM_READWRITE(x68k_sram_r, x68k_sram_w) AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) |
| 1431 | AM_RANGE(0xed0000, 0xed3fff) AM_RAMBANK(4) AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) |
| 1431 | 1432 | AM_RANGE(0xed4000, 0xefffff) AM_NOP |
| 1432 | 1433 | AM_RANGE(0xf00000, 0xffffff) AM_ROM |
| 1433 | 1434 | ADDRESS_MAP_END |
| r843 | r844 | |
| 1771 | 1772 | memset(mess_ram,0,mess_ram_size); |
| 1772 | 1773 | memcpy(mess_ram,romdata,8); |
| 1773 | 1774 | |
| 1774 | | memset(&sys,0,sizeof(sys)); |
| 1775 | | |
| 1776 | 1775 | // init keyboard |
| 1777 | 1776 | sys.keyboard.delay = 500; // 3*100+200 |
| 1778 | 1777 | sys.keyboard.repeat = 110; // 4^2*5+30 |
| r843 | r844 | |
| 1821 | 1820 | memory_install_read16_handler(0,ADDRESS_SPACE_PROGRAM,0xe00000,0xe7ffff,0x07ffff,0,(read16_handler)x68k_tvram_r); |
| 1822 | 1821 | memory_install_write16_handler(0,ADDRESS_SPACE_PROGRAM,0xe00000,0xe7ffff,0x07ffff,0,(write16_handler)x68k_tvram_w); |
| 1823 | 1822 | memory_set_bankptr(3,tvram); // so that code in VRAM is executable - needed for Terra Cresta |
| 1823 | memory_install_read16_handler(0,ADDRESS_SPACE_PROGRAM,0xed0000,0xed3fff,0x003fff,0,(read16_handler)x68k_sram_r); |
| 1824 | memory_install_write16_handler(0,ADDRESS_SPACE_PROGRAM,0xed0000,0xed3fff,0x003fff,0,(write16_handler)x68k_sram_w); |
| 1825 | memory_set_bankptr(4,generic_nvram16); // so that code in SRAM is executable, there is an option for booting from SRAM |
| 1824 | 1826 | |
| 1825 | 1827 | // start keyboard timer |
| 1826 | 1828 | mame_timer_adjust(kb_timer,time_zero,0,MAME_TIME_IN_MSEC(5)); // every 5ms |
| r843 | r844 | |
| 1857 | 1859 | scc_init(&scc_interface); |
| 1858 | 1860 | rp5c15_init(&rtc_intf); |
| 1859 | 1861 | |
| 1862 | memset(&sys,0,sizeof(sys)); |
| 1863 | |
| 1860 | 1864 | cpunum_set_irq_callback(0, x68k_int_ack); |
| 1861 | 1865 | |
| 1862 | 1866 | // init keyboard |
| r843 | r844 | |
| 1912 | 1916 | CONFIG_DEVICE(x68k_floppy_getinfo) |
| 1913 | 1917 | CONFIG_RAM(0x100000) |
| 1914 | 1918 | CONFIG_RAM(0x200000) |
| 1919 | CONFIG_RAM(0x300000) |
| 1915 | 1920 | CONFIG_RAM_DEFAULT(0x400000) // 4MB - should be enough for most things |
| 1921 | CONFIG_RAM(0x500000) |
| 1922 | CONFIG_RAM(0x600000) |
| 1923 | CONFIG_RAM(0x700000) |
| 1916 | 1924 | CONFIG_RAM(0x800000) |
| 1925 | CONFIG_RAM(0x900000) |
| 1926 | CONFIG_RAM(0xa00000) |
| 1927 | CONFIG_RAM(0xb00000) |
| 1917 | 1928 | CONFIG_RAM(0xc00000) // 12MB - maximum possible |
| 1918 | 1929 | SYSTEM_CONFIG_END |
| 1919 | 1930 | |