src/mess/video/fm7.c
| r5147 | r5148 | |
| 27 | 27 | UINT16 x1; |
| 28 | 28 | UINT16 y0; |
| 29 | 29 | UINT16 y1; |
| 30 | UINT8 busy; |
| 30 | 31 | } fm7_alu; |
| 31 | 32 | |
| 32 | 33 | extern UINT8* fm7_video_ram; |
| r5147 | r5148 | |
| 335 | 336 | } |
| 336 | 337 | } |
| 337 | 338 | |
| 339 | static void fm7_alu_function_invalid(UINT32 offset) |
| 340 | { |
| 341 | // Invalid function, still does something though (used by Laydock) |
| 342 | int x; |
| 343 | UINT8 dat; |
| 344 | int page = 0; |
| 345 | UINT8 mask; |
| 346 | |
| 347 | if(fm7_alu.command & 0x40) |
| 348 | fm7_alu_function_compare(offset); |
| 349 | |
| 350 | if(offset >= 0xc000) |
| 351 | page = 1; |
| 352 | |
| 353 | for(x=0;x<3;x++) // cycle through banks |
| 354 | { |
| 355 | if(!(fm7_alu.bank_disable & (1 << x))) |
| 356 | { |
| 357 | mask = (fm7_video_ram[(offset & 0x3fff) + (x * 0x4000) + (page * 0xc000)]); |
| 358 | |
| 359 | dat = mask & fm7_alu.mask; |
| 360 | |
| 361 | fm7_video_ram[(offset & 0x3fff) + (x * 0x4000) + (page * 0xc000)] = dat; |
| 362 | } |
| 363 | } |
| 364 | } |
| 365 | |
| 338 | 366 | static void fm7_alu_function_tilepaint(UINT32 offset) |
| 339 | 367 | { |
| 340 | 368 | // TILEPAINT - writes to VRAM based on the tilepaint colour registers |
| r5147 | r5148 | |
| 401 | 429 | break; |
| 402 | 430 | case 0x01: |
| 403 | 431 | default: |
| 404 | | popmessage("ALU: Invalid draw mode %i used\n",fm7_alu.command & 0x07); |
| 432 | fm7_alu_function_invalid(offset); |
| 405 | 433 | } |
| 406 | 434 | } |
| 407 | 435 | |