src/mess/includes/x68k.h
| r848 | r849 | |
| 108 | 108 | unsigned short reg[24]; // registers |
| 109 | 109 | int operation; // operation port (0xe80481) |
| 110 | 110 | int vblank; // 1 if in VBlank |
| 111 | int hblank; // 1 if in HBlank |
| 111 | 112 | int height; |
| 112 | 113 | int width; |
| 113 | 114 | int visible_height; |
| r848 | r849 | |
| 175 | 176 | |
| 176 | 177 | TIMER_CALLBACK(x68k_crtc_raster_irq); |
| 177 | 178 | TIMER_CALLBACK(x68k_crtc_vblank_irq); |
| 178 | | //void x68k_scanline_check(int); |
| 179 | TIMER_CALLBACK(x68k_hsync); |
| 179 | 180 | |
| 180 | 181 | PALETTE_INIT( x68000 ); |
| 181 | 182 | READ16_HANDLER( x68k_spritereg_r ); |
src/mess/video/x68k.c
| r848 | r849 | |
| 182 | 182 | // mame_timer_adjust(scanline_timer,time_zero,0,scantime); |
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | | /* |
| 186 | | void x68k_scanline_check(int dummy) |
| 187 | | { |
| 188 | | double scantime; |
| 189 | 185 | |
| 190 | | x68k_scanline++; |
| 191 | | if(x68k_scanline >= sys.crtc.reg[4] + 1) |
| 186 | TIMER_CALLBACK(x68k_hsync) |
| 187 | { |
| 188 | int state = param; |
| 189 | mame_time irq_time = video_screen_get_scan_period(0); |
| 190 | mame_time hsync_time = MAME_TIME_IN_CYCLES(0,32); |
| 191 | |
| 192 | if(state == 1) |
| 192 | 193 | { |
| 193 | | if(sys.crtc.reg[7] > sys.crtc.reg[4]) |
| 194 | | { // Rygar appears to set the vertical total to be less than the vertical end. |
| 195 | | sys.crtc.vblank = 1; |
| 196 | | mfp_timer_a_callback(0); |
| 197 | | mfp_trigger_irq(MFP_IRQ_GPIP4); // V-DISP |
| 198 | | // logerror("VBLANK start: Scanline %i\n",x68k_scanline); |
| 199 | | } |
| 200 | | x68k_scanline = 0; |
| 201 | | // set scanline timer for current Vertical Total (CRTC reg 4) |
| 202 | | if(sys.crtc.reg[4] != 0) |
| 203 | | { |
| 204 | | scantime = MAME_TIME_IN_HZ(55.45) / sys.crtc.reg[4]; |
| 205 | | mame_timer_adjust(scanline_timer,time_zero,0,scantime); |
| 206 | | } |
| 194 | sys.crtc.hblank = 1; |
| 195 | mfp_trigger_irq(MFP_IRQ_GPIP7); // HSync |
| 196 | mame_timer_adjust(scanline_timer,hsync_time,0,time_never); |
| 207 | 197 | } |
| 208 | | if(x68k_scanline == sys.crtc.reg[7] + 1) // Vertical end |
| 198 | if(state == 0) |
| 209 | 199 | { |
| 210 | | sys.crtc.vblank = 1; |
| 211 | | mfp_timer_a_callback(0); |
| 212 | | if(!(sys.mfp.aer & 0x10)) |
| 213 | | mfp_trigger_irq(MFP_IRQ_GPIP4); // V-DISP |
| 214 | | // logerror("VBLANK start: Scanline %i\n",x68k_scanline); |
| 200 | double time_to_irq = mame_time_to_double(irq_time) - mame_time_to_double(hsync_time); |
| 201 | sys.crtc.hblank = 0; |
| 202 | mame_timer_adjust(scanline_timer,double_to_mame_time(time_to_irq),1,time_never); |
| 215 | 203 | } |
| 216 | | if(x68k_scanline == sys.crtc.reg[6] + 1) // Vertical beginning |
| 217 | | { |
| 218 | | sys.crtc.vblank = 0; |
| 219 | | if(sys.mfp.aer & 0x10) |
| 220 | | mfp_trigger_irq(MFP_IRQ_GPIP4); // V-DISP |
| 221 | | // logerror("VBLANK end: Scanline %i\n",x68k_scanline); |
| 222 | | } |
| 223 | 204 | } |
| 224 | | */ |
| 205 | |
| 206 | |
| 225 | 207 | TIMER_CALLBACK(x68k_crtc_raster_irq) |
| 226 | 208 | { |
| 227 | 209 | int scan = param; |
src/mess/drivers/x68k.c
| r848 | r849 | |
| 106 | 106 | Keyboard doesn't work well for games. |
| 107 | 107 | Supervisor area set isn't implemented. |
| 108 | 108 | |
| 109 | | Some minor game-specific issues (at 17/04/07): |
| 109 | Some minor game-specific issues (at 19/06/07): |
| 110 | 110 | Pacmania: Black squares on the maze (transparency?). |
| 111 | | Nemesis '94: MSX 68k intro isn't correct, menu system doesn't work except for start buttons, Konami logo and |
| 112 | | menu display aren't correct. |
| 111 | Nemesis '94: Menu system doesn't work except for start buttons. |
| 113 | 112 | Flying Shark: Appears to lock up at main menu. |
| 114 | 113 | Salamander: System error when using keys in-game. No error if a joystick is used. |
| 115 | 114 | Kyukyoku Tiger:Sprites offset by a looooong way. |
| r848 | r849 | |
| 1805 | 1804 | sys.crtc.vblank = 1; |
| 1806 | 1805 | irq_time = video_screen_get_time_until_pos(0,sys.crtc.reg[6],2); |
| 1807 | 1806 | mame_timer_adjust(vblank_irq,irq_time,0,time_never); |
| 1807 | |
| 1808 | // start HBlank timer |
| 1809 | mame_timer_adjust(scanline_timer,video_screen_get_scan_period(0),1,time_never); |
| 1808 | 1810 | } |
| 1809 | 1811 | |
| 1810 | 1812 | MACHINE_START( x68000 ) |
| r848 | r849 | |
| 1867 | 1869 | sys.keyboard.delay = 500; // 3*100+200 |
| 1868 | 1870 | sys.keyboard.repeat = 110; // 4^2*5+30 |
| 1869 | 1871 | kb_timer = mame_timer_alloc(x68k_keyboard_poll); |
| 1870 | | // scanline_timer = mame_timer_alloc(x68k_scanline_check); |
| 1872 | scanline_timer = mame_timer_alloc(x68k_hsync); |
| 1871 | 1873 | raster_irq = mame_timer_alloc(x68k_crtc_raster_irq); |
| 1872 | 1874 | vblank_irq = mame_timer_alloc(x68k_crtc_vblank_irq); |
| 1873 | 1875 | mouse_timer = mame_timer_alloc(x68k_scc_ack); |