mirror of
https://github.com/pevans/erc-c.git
synced 2025-04-06 13:41:04 +00:00
Draw text in 40 column mode
This commit is contained in:
parent
a55fd2f71f
commit
d4bf5da480
@ -6,5 +6,6 @@
|
||||
|
||||
extern void apple2_draw_pixel(apple2 *, vm_16bit);
|
||||
extern void apple2_draw_text(apple2 *, vm_16bit);
|
||||
extern void apple2_draw_40col(apple2 *);
|
||||
|
||||
#endif
|
||||
|
@ -324,6 +324,7 @@ apple2_run_loop(apple2 *mach)
|
||||
while (vm_screen_active(mach->screen)) {
|
||||
mos6502_dis_opcode(mach->cpu, stdout, mach->cpu->PC);
|
||||
mos6502_execute(mach->cpu);
|
||||
apple2_draw_40col(mach);
|
||||
vm_screen_refresh(mach->screen);
|
||||
}
|
||||
}
|
||||
|
@ -159,3 +159,17 @@ apple2_draw_text(apple2 *mach, vm_16bit addr)
|
||||
// Now show the goddamned thing
|
||||
vm_bitfont_render(mach->sysfont, mach->screen, &dest, ch);
|
||||
}
|
||||
|
||||
void
|
||||
apple2_draw_40col(apple2 *mach)
|
||||
{
|
||||
size_t addr;
|
||||
|
||||
for (addr = 0x400; addr < 0x800; addr++) {
|
||||
if ((addr & 0xFF) == 0x39) {
|
||||
addr += 0x40;
|
||||
}
|
||||
|
||||
apple2_draw_text(mach, addr);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user