Compare commits

...

4 Commits

Author SHA1 Message Date
David Kuder d46ae93e6a 80 column fixes and vga render call consitency 2023-04-22 03:49:15 -04:00
David Kuder 8b289bd3fb Fix monochrome mode config setting not honored 2023-04-22 03:48:43 -04:00
David Kuder 88a60d11b6 Update main.c
Sort autodetect sequences so they are shortcut until the last byte is in place
2023-04-22 03:48:25 -04:00
David Kuder 7c3fa52a3f monochrome bit test fix
Fix for issue:
https://github.com/V2RetroComputing/analog/issues/15
2023-04-22 03:47:38 -04:00
6 changed files with 13 additions and 13 deletions

View File

@ -90,7 +90,7 @@ bool DELAYED_COPY_CODE(parse_config)(uint32_t address) {
romx_changed = 1;
break;
case CFGTOKEN_MONO_00:
mono_palette = (config[i] >> 16) & 0xF;
mono_palette = (config[i] >> 20) & 0xF;
break;
case CFGTOKEN_TBCOLOR:
terminal_tbcolor = (config[i] >> 16) & 0xFF;

View File

@ -79,11 +79,11 @@ static void __noinline __time_critical_func(core1_loop)() {
}
#ifdef FUNCTION_VGA
} else if(current_machine == MACHINE_AUTO) {
if((apple_memory[0x0403] == 0xD8) && (apple_memory[0x404] == 0xE5)) { // ROMXe
if((apple_memory[0x404] == 0xE5) && (apple_memory[0x0403] == 0xD8)) { // ROMXe
current_machine = MACHINE_IIE;
internal_flags |= IFLAGS_IIE_REGS;
internal_flags &= ~IFLAGS_IIGS_REGS;
} else if((apple_memory[0x0412] == 0xC5) && (apple_memory[0x0413] == 0xD8)) { // ROMX
} else if((apple_memory[0x0413] == 0xD8) && (apple_memory[0x0412] == 0xC5)) { // ROMX
current_machine = MACHINE_II;
internal_flags &= ~(IFLAGS_IIE_REGS | IFLAGS_IIGS_REGS);
} else if((apple_memory[0x0417] == 0xE7) && (apple_memory[0x416] == 0xC9)) { // Apple IIgs
@ -101,7 +101,7 @@ static void __noinline __time_critical_func(core1_loop)() {
} else if(apple_memory[0x0410] == 0xD0) { // Apple II/Plus/J-Plus with Autostart
current_machine = MACHINE_II;
internal_flags &= ~(IFLAGS_IIE_REGS | IFLAGS_IIGS_REGS);
} else if((apple_memory[0x07D0] == 0xAA) && (apple_memory[0x07D1] == 0x60)) { // Apple II without Autostart
} else if((apple_memory[0x07D1] == 0x60) && (apple_memory[0x07D0] == 0xAA)) { // Apple II without Autostart
current_machine = MACHINE_II;
internal_flags &= ~(IFLAGS_IIE_REGS | IFLAGS_IIGS_REGS);
} else if(apple_memory[0x0410] == 0xF2) { // Pravetz!

View File

@ -207,8 +207,12 @@ void DELAYED_COPY_CODE(render_loop)() {
}
#if defined(ANALOG_GS) || defined(OVERCLOCKED)
} else if(soft_switches & SOFTSW_SHR) {
vga_prepare_frame();
render_shr();
#endif
} else if(soft_switches & SOFTSW_TERMINAL) {
vga_prepare_frame();
render_terminal();
} else {
vga_prepare_frame();
@ -220,9 +224,6 @@ void DELAYED_COPY_CODE(render_loop)() {
render_border(32);
}
if(soft_switches & SOFTSW_TERMINAL) {
render_terminal();
} else
switch(soft_switches & SOFTSW_MODE_MASK) {
case 0:
if(soft_switches & SOFTSW_DGR) {

View File

@ -184,9 +184,10 @@ void DELAYED_COPY_CODE(terminal_process_input)() {
}
static void DELAYED_COPY_CODE(render_terminal_line)(uint16_t line) {
uint glyph_line = line & 0x7;
const uint8_t *line_buf = (const uint8_t *)terminal_memory + (((line/10) * 128) & 0xFFF);
bool cursor_row = ((((terminal_row+terminal_jsoffset) * 128) & 0xFFF) == (((line>>3) * 128) & 0xFFF));
uint glyph_line = line % 10;
uint text_line_offset = ((line / 10) * 128) & 0xFFF;
const uint8_t *line_buf = (const uint8_t *)terminal_memory + text_line_offset;
bool cursor_row = ((((terminal_row+terminal_jsoffset) * 128) & 0xFFF) == text_line_offset);
struct vga_scanline *sl = vga_prepare_scanline();
uint sl_pos = 0;

View File

@ -103,7 +103,7 @@ static void DELAYED_COPY_CODE(render_dhgr_line)(bool p2, uint line) {
dots |= (line_mema[i] & 0x7f) << 25;
i++;
if(soft_switches & SOFTSW_MONOCHROME) {
if((soft_switches & SOFTSW_MONOCHROME) || (mono_palette & 0x8)) {
// Consume 8 pixels (32 subpixel bits)
for(j = 0; j < 16; j++) {
pixeldata = ((dots & 1) ? (text_fore) : (text_back));

View File

@ -17,8 +17,6 @@ static inline uint16_t rgb444(uint16_t a) {
#endif
void DELAYED_COPY_CODE(render_shr)() {
vga_prepare_frame();
render_border(40);
for(uint line=0; line < 200; line++) {