Use Videx Font ROM format for 80 column card

This commit is contained in:
David Kuder 2023-04-18 15:45:24 -04:00
parent a29b7d8921
commit 8ab81aa379
4 changed files with 8 additions and 4 deletions

View File

@ -63,8 +63,12 @@
#define FLASH_FONT_EXTRA26 FLASH_FONT(0x26)
#define FLASH_FONT_EXTRA27 FLASH_FONT(0x27)
// Videx Font
#define FLASH_VIDEX_SIZE (4*1024)
#define FLASH_VIDEX_BASE (FLASH_FONT_BASE - FLASH_VIDEX_SIZE)
// Firmware for $C000-$CFFF
#define FLASH_6502_SIZE (4*1024)
#define FLASH_6502_BASE (FLASH_FONT_BASE - FLASH_6502_SIZE)
#define FLASH_6502_BASE (FLASH_VIDEX_BASE - FLASH_6502_SIZE)
extern void flash_reboot() __attribute__ ((noreturn));

View File

@ -112,7 +112,7 @@ void DELAYED_COPY_CODE(render_init)() {
terminal_tbcolor = 0xf0;
terminal_border = 0x00;
memcpy(terminal_character_rom, (void*)FLASH_FONT_APPLE_IIE, 4096);
memcpy(terminal_character_rom, (void*)FLASH_VIDEX_BASE, 4096);
memset(status_line, 0, sizeof(status_line));
terminal_clear_screen();

View File

@ -17,7 +17,7 @@ uint8_t terminal_width = 80;
uint8_t terminal_height = 24;
static inline uint_fast8_t char_terminal_bits(uint_fast8_t ch, uint_fast8_t glyph_line) {
uint_fast8_t bits = terminal_character_rom[terminal_charset | (((uint_fast16_t)ch & 0x7f) << 3) | glyph_line];
uint_fast8_t bits = terminal_character_rom[terminal_charset | (((uint_fast16_t)ch & 0x7f) << 4) | glyph_line];
if(ch & 0x80) {
return (bits & 0x7f) ^ 0x7f;

View File

@ -46,7 +46,7 @@ void DELAYED_COPY_CODE(render_about_init)() {
}
static inline uint_fast8_t char_test_bits(uint_fast8_t ch, uint_fast8_t glyph_line) {
uint_fast8_t bits = terminal_character_rom[((uint_fast16_t)(ch & 0x7f) << 3) | glyph_line | 0x400];
uint_fast8_t bits = terminal_character_rom[((uint_fast16_t)(ch & 0x7f) << 4) | glyph_line];
return bits & 0x7f;
}