src/mess/video/zx.c
| r1915 | r1916 | |
| 17 | 17 | ****************************************************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "driver.h" |
| 20 | | #include "deprecat.h" |
| 21 | 20 | #include "cpu/z80/z80.h" |
| 22 | 21 | #include "includes/zx.h" |
| 23 | 22 | #include "sound/dac.h" |
| r1915 | r1916 | |
| 40 | 39 | * (during tape IO or sound output) zx_ula_bkgnd() is used to |
| 41 | 40 | * simulate the display of a ZX80/ZX81. |
| 42 | 41 | */ |
| 43 | | void zx_ula_bkgnd(int color) |
| 42 | void zx_ula_bkgnd(running_machine *machine, int color) |
| 44 | 43 | { |
| 45 | 44 | if (ula_frame_vsync == 0 && color != old_c) |
| 46 | 45 | { |
| r1915 | r1916 | |
| 59 | 58 | r.min_x = old_x; |
| 60 | 59 | r.max_x = new_x; |
| 61 | 60 | r.min_y = r.max_y = y; |
| 62 | | fillbitmap(bitmap, Machine->pens[color], &r); |
| 61 | fillbitmap(bitmap, machine->pens[color], &r); |
| 63 | 62 | break; |
| 64 | 63 | } |
| 65 | 64 | else |
| 66 | 65 | { |
| 67 | 66 | r.min_x = old_x; |
| 68 | | r.max_x = Machine->screen[0].visarea.max_x; |
| 67 | r.max_x = machine->screen[0].visarea.max_x; |
| 69 | 68 | r.min_y = r.max_y = y; |
| 70 | | fillbitmap(bitmap, Machine->pens[color], &r); |
| 69 | fillbitmap(bitmap, machine->pens[color], &r); |
| 71 | 70 | old_x = 0; |
| 72 | 71 | } |
| 73 | | if (++y == Machine->screen[0].height) |
| 72 | if (++y == machine->screen[0].height) |
| 74 | 73 | y = 0; |
| 75 | 74 | } |
| 76 | | old_x = (new_x + 1) % Machine->screen[0].width; |
| 75 | old_x = (new_x + 1) % machine->screen[0].width; |
| 77 | 76 | old_y = new_y; |
| 78 | 77 | old_c = color; |
| 79 | 78 | DAC_data_w(0, color ? 255 : 0); |
src/mess/machine/zx.c
| r1915 | r1916 | |
| 87 | 87 | } |
| 88 | 88 | else |
| 89 | 89 | { |
| 90 | | zx_ula_bkgnd(1); |
| 90 | zx_ula_bkgnd(machine, 1); |
| 91 | 91 | if (ula_frame_vsync == 2) |
| 92 | 92 | { |
| 93 | 93 | cpu_spinuntil_time(video_screen_get_time_until_pos(0, machine->screen[0].height - 1, 0)); |
| r1915 | r1916 | |
| 135 | 135 | |
| 136 | 136 | if (ula_irq_active) |
| 137 | 137 | { |
| 138 | | zx_ula_bkgnd(0); |
| 138 | zx_ula_bkgnd(machine, 0); |
| 139 | 139 | ula_irq_active = 0; |
| 140 | 140 | |
| 141 | 141 | LOG_ZX81_IOR("ULA IRQs off"); |
| r1915 | r1916 | |
| 200 | 200 | |
| 201 | 201 | if (ula_irq_active) |
| 202 | 202 | { |
| 203 | | zx_ula_bkgnd(0); |
| 203 | zx_ula_bkgnd(machine, 0); |
| 204 | 204 | ula_irq_active = 0; |
| 205 | 205 | LOG_ZX81_IOR("ULA IRQs off"); |
| 206 | 206 | } |