Improve NTSC artifact auto switching

pull/154/head
IanSB 2020-07-15 17:19:58 +01:00
rodzic 250a91f86a
commit 828d6dfa98
6 zmienionych plików z 234 dodań i 158 usunięć

Wyświetl plik

@ -38,12 +38,14 @@
mov r11, #0
skip_psync_loop_no_old\@:
WAIT_FOR_PSYNC_EDGE_FAST // wait for next edge of psync
and r12, r8, #(0x10 << PIXEL_BASE)
orr r11, r11, r12
and r12, r8, #(0x10 << (PIXEL_BASE + 6))
orr r11, r11, r12
and r10, r8, #(0x10 << PIXEL_BASE)
orr r11, r11, r10
and r10, r8, #(0x10 << (PIXEL_BASE + 6))
orr r11, r11, r10
subs r7, r7, #1
bne skip_psync_loop_no_old\@
cmp r11, #0
movne r11, #8 //burst detected
.endm
@ -95,7 +97,6 @@ skip_psync_loop_no_old\@:
.macro NO_BURST_NTSC_DECODE reg
and r8, r12, #3 //shift pixels by low 2 bits of NTSC phase
eor r8, r8, #3
mov r14, r11, lsr r8
mov \reg, #0
tst r14, #0x01000000
@ -108,10 +109,8 @@ skip_psync_loop_no_old\@:
orrne \reg, \reg, #0x2f000000
.endm
.macro NTSC_DECODE reg
and r8, r12, #3 //shift pixels by low 2 bits of NTSC phase
eor r8, r8, #3
mov r14, r11, lsr r8
and r9, r14, #0x0e000000
@ -183,7 +182,6 @@ skip_psync_loop_no_old\@:
b done_white\@
not_white\@:
and r8, r12, #3 //shift pixels by low 2 bits of NTSC phase
eor r8, r8, #3
mov r14, r11, lsr r8
and r9, r14, #0x0e000000
@ -335,13 +333,88 @@ done_white\@:
.endm
.text
.macro NO_NTSC_DECODE
WAIT_FOR_PSYNC_EDGE
NTSC_CAPTURE_BITS_8BPP
loop_8bpp_mono_auto_noburst\@:
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NO_BURST_NTSC_DECODE r5
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NO_BURST_NTSC_DECODE r6
WRITE_R5_R6_IF_LAST
cmp r1, #1
popeq {r0, pc}
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NO_BURST_NTSC_DECODE r7
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NO_BURST_NTSC_DECODE r10
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp_mono_auto_noburst\@
ldr r0, =ntsc_status
str r12, [r0]
pop {r0, pc}
.ltorg
.endm
.macro NO_NTSC_DECODE_6BIT
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
loop_8bpp_mono6_auto_noburst\@:
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r5
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r6
WRITE_R5_R6_IF_LAST
cmp r1, #1
ldreq r0, =ntsc_status
streq r12, [r0]
popeq {r0, pc}
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r7
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r10
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp_mono6_auto_noburst\@
ldr r0, =ntsc_status
str r12, [r0]
pop {r0, pc}
.ltorg
.endm
.text
.global capture_line_ntsc_8bpp_cga
.global capture_line_ntsc_8bpp_mono
.global capture_line_ntsc_8bpp
.global capture_line_ntsc_sixbits_8bpp_cga
.global capture_line_ntsc_sixbits_8bpp_mono
.global capture_line_ntsc_sixbits_8bpp_mono_auto
.global capture_line_ntsc_sixbits_8bpp
// The capture line function is provided the following:
// r0 = pointer to current line in frame buffer
@ -356,16 +429,63 @@ done_white\@:
//
// All registers are available as scratch registers (i.e. nothing needs to be preserved)
.ltorg
.align 6
// *** 8 bit ***
b preload_capture_line_ntsc_8bpp_cga
capture_line_ntsc_8bpp_cga:
push {lr}
ldr r12, =ntsc_status // in r12, low 2 bits ntsc phase, next bit is ntsccolour, next bit is burst detect
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns r11 = 8 if burst detected
ldr r12, [r12]
mov r11, #0
push {r14}
WAIT_FOR_PSYNC_EDGE
NTSC_CAPTURE_BITS_8BPP
loop_8bpp3:
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r5
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r6
WRITE_R5_R6_IF_LAST
cmp r1, #1
popeq {r0, pc}
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r7
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r10
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp3
pop {r0, pc}
.ltorg
preload_capture_line_ntsc_8bpp_cga:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_8bpp_cga
.align 6
b preload_capture_line_ntsc_8bpp_mono
capture_line_ntsc_8bpp_mono:
push {lr}
SKIP_PSYNC
ldr r12, =param_ntscphase
push {r14}
mov r11, #0
ldr r12, =ntsc_status // in r12, low 2 bits ntsc phase, next bit is ntsccolour, next bit is burst detect
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns r11 = 8 if burst detected
ldr r12, [r12]
mov r11, #0
tst r12, #4
push {r14}
beq no_ntsc_8bpp_mono
WAIT_FOR_PSYNC_EDGE
NTSC_CAPTURE_BITS_8BPP_MONO
loop_8bpp_mono3:
@ -393,123 +513,27 @@ loop_8bpp_mono3:
bne loop_8bpp_mono3
pop {r0, pc}
.ltorg
no_ntsc_8bpp_mono:
NO_NTSC_DECODE
.align 6
preload_capture_line_ntsc_8bpp_mono:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_8bpp_mono
.ltorg
// *** 8 bit mono ***
//***************************************************************************************
b preload_capture_line_ntsc_sixbits_8bpp_mono
capture_line_ntsc_sixbits_8bpp_mono:
push {lr}
SKIP_PSYNC_NO_OLD_CPLD
ldr r12, =param_ntscphase
push {r14}
mov r11, #0
ldr r12, [r12]
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
loop_8bpp_mono6:
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NTSC_DECODE r5
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NTSC_DECODE r6
WRITE_R5_R6_IF_LAST
cmp r1, #1
popeq {r0, pc}
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NTSC_DECODE r7
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NTSC_DECODE r10
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp_mono6
pop {r0, pc}
preload_capture_line_ntsc_sixbits_8bpp_mono:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_sixbits_8bpp_mono
.ltorg
.align 6
// *** 8 bit ***
b preload_capture_line_ntsc_8bpp
capture_line_ntsc_8bpp:
push {lr}
SKIP_PSYNC
ldr r12, =param_ntscphase
push {r14}
mov r11, #0
ldr r12, [r12]
WAIT_FOR_PSYNC_EDGE
NTSC_CAPTURE_BITS_8BPP
loop_8bpp3:
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r5
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r6
WRITE_R5_R6_IF_LAST
cmp r1, #1
popeq {r0, pc}
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r7
WAIT_FOR_PSYNC_EDGE // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP // input in r8
NTSC_DECODE_CGA r10
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp3
pop {r0, pc}
preload_capture_line_ntsc_8bpp:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_8bpp
.ltorg
.align 6
b preload_capture_line_ntsc_sixbits_8bpp
capture_line_ntsc_sixbits_8bpp:
b preload_capture_line_ntsc_sixbits_8bpp_cga
capture_line_ntsc_sixbits_8bpp_cga:
push {lr}
SKIP_PSYNC_NO_OLD_CPLD
ldr r12, =param_ntscphase
push {r14}
mov r11, #0
ldr r12, =ntsc_status // in r12, low 2 bits ntsc phase, next bit is ntsccolour, next bit is burst detect
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns r11 = 8 if burst detected
ldr r12, [r12]
mov r11, #0
push {r14}
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
@ -547,31 +571,30 @@ loop_8bpp6:
bne loop_8bpp6
pop {r0, pc}
preload_capture_line_ntsc_sixbits_8bpp:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_sixbits_8bpp
.ltorg
preload_capture_line_ntsc_sixbits_8bpp_cga:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_sixbits_8bpp_cga
// *** 8 bit mono auto ***
b preload_capture_line_ntsc_sixbits_8bpp_mono_auto
capture_line_ntsc_sixbits_8bpp_mono_auto:
// *** 8 bit mono ***
.align 6
b preload_capture_line_ntsc_sixbits_8bpp_mono
capture_line_ntsc_sixbits_8bpp_mono:
push {lr}
SKIP_PSYNC_NO_OLD_CPLD_NTSC
ldr r12, =param_ntscphase
push {r14}
cmp r11, #0
mov r11, #0
ldr r12, =ntsc_status // in r12, low 2 bits ntsc phase, next bit is ntsccolour, next bit is burst detect
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns r11 = 8 if burst detected
ldr r12, [r12]
beq no_ntsc_burst_detected
mov r11, #0
tst r12, #4
push {r14}
beq no_ntsc_sixbits_8bpp_mono
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
loop_8bpp_mono6_auto:
loop_8bpp_mono6:
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
@ -601,52 +624,82 @@ loop_8bpp_mono6_auto:
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp_mono6_auto
bne loop_8bpp_mono6
pop {r0, pc}
.ltorg
no_ntsc_sixbits_8bpp_mono:
NO_NTSC_DECODE_6BIT
preload_capture_line_ntsc_sixbits_8bpp_mono:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_sixbits_8bpp_mono
no_ntsc_burst_detected:
// *** 8 bit mono auto ***
.align 6
b preload_capture_line_ntsc_sixbits_8bpp_mono_auto
capture_line_ntsc_sixbits_8bpp_mono_auto:
push {lr}
ldr r12, =ntsc_status
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns r11 = 0 if burst detected, 8 if not detected
ldr r12, [r12] // in r12, low 2 bits ntsc phase, next bit is ntsccolour, next bit is burst detect
eor r9, r11, r12
eor r9, #8 //invert result so following tests can cascade
tst r9, #8
bicne r12, r12, #0xff00
addeq r12, r12, #0x0100
andeq r9, r12, #0xff00
cmpeq r9, #0x6400 //if burst state changed for 100 lines then change artifact colour state
biceq r12, r12, #4+8
orreq r12, r12, r11, lsr #1
orreq r12, r12, r11
mov r11, #0
push {r14}
tst r12, #4
beq no_ntsc_sixbits_8bpp_mono_auto
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
WAIT_FOR_PSYNC_EDGE_FAST
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE
loop_8bpp_mono6_auto_noburst:
loop_8bpp_mono6_auto:
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r5
NTSC_DECODE r5
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r6
NTSC_DECODE r6
WRITE_R5_R6_IF_LAST
cmp r1, #1
ldreq r0, =ntsc_status
streq r12, [r0]
popeq {r0, pc}
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r7
NTSC_DECODE r7
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
NTSC_CAPTURE_BITS_8BPP_MONO_WIDE // input in r8
NO_BURST_NTSC_DECODE r10
NTSC_DECODE r10
WRITE_R5_R6_R7_R10
subs r1, r1, #2
bne loop_8bpp_mono6_auto_noburst
bne loop_8bpp_mono6_auto
ldr r0, =ntsc_status
str r12, [r0]
pop {r0, pc}
.ltorg
no_ntsc_sixbits_8bpp_mono_auto:
NO_NTSC_DECODE_6BIT
preload_capture_line_ntsc_sixbits_8bpp_mono_auto:
SETUP_DUMMY_PARAMETERS
b capture_line_ntsc_sixbits_8bpp_mono_auto
.ltorg

Wyświetl plik

@ -417,7 +417,7 @@ void geometry_get_fb_params(capture_info_t *capinfo) {
capinfo->border = 0x12; // max green/Y
}
capinfo->ntscphase = get_ntscphase();
capinfo->ntscphase = get_ntscphase() | get_ntsccolour() << 2;
int h_size = get_hdisplay();
int v_size = get_vdisplay();

Wyświetl plik

@ -2819,7 +2819,7 @@ void osd_update_palette() {
i_adj ^= 0x12;
}
if (get_feature(F_PALETTECONTROL) < PALETTECONTROL_NTSCARTIFACT_CGA || get_feature(F_NTSCCOLOUR) == 0 || geometry_get_value(FB_BPP) != 8 || (geometry_get_value(FB_SIZEX2) & 2) != 0) {
if (get_feature(F_PALETTECONTROL) < PALETTECONTROL_NTSCARTIFACT_CGA || (get_feature(F_PALETTECONTROL) == PALETTECONTROL_NTSCARTIFACT_CGA && get_feature(F_NTSCCOLOUR) == 0) || geometry_get_value(FB_BPP) != 8 || (geometry_get_value(FB_SIZEX2) & 2) != 0) {
palette_data[i] = palette_array[palette][i_adj];
} else {
//if (get_paletteControl() == PALETTECONTROL_NTSCARTIFACT_CGA) {

Wyświetl plik

@ -35,9 +35,8 @@
.global benchmarkRAM
.global jitter_offset
.global debug_value
.global param_ntscphase
.global ntsc_status
.global field_type_threshold
.global elk_lo_field_sync_threshold
@ -124,6 +123,12 @@ rgb_to_fb:
ldr r2, [r0, #O_FB_BASE]
str r2, param_framebuffer0
ldr r9, ntsc_status
and r9, #0x08 // last detected burst state
ldr r8, param_ntscphase // 2 bits phase + 1 bit artifact on/off
orr r9, r9, r8
str r9, ntsc_status
// Sanity check chars_per_line <= fb_pitch
ldr r3, param_fb_pitch
ldr r2, param_fb_bpp
@ -258,6 +263,7 @@ skip_swap:
bl restore_menu_bits
frame:
ldr r8, =inBandPointer
ldr r9, =inBandData
@ -637,7 +643,7 @@ process_line_loop:
str r7, hsync_period
ldr r0, param_nlines
cmp r0, r5 //ignore 1st line as time undefined
ldrne r0, total_hsync_period
ldrne r0, total_hsync_period
addne r0, r0, r7
strne r0, total_hsync_period
@ -659,6 +665,7 @@ process_line_loop:
pop {r11}
skip_all_lines:
tst r3, #BIT_OSD | BIT_CALIBRATE | BIT_PROBE
bne skip_sync_time_test
@ -854,6 +861,13 @@ lock_failed:
// Return
exit:
push {r0}
ldr r9, ntsc_status
tst r9, #4
moveq r0,#0
movne r0,#1
bl set_ntsccolour
pop {r0}
#ifdef MULTI_BUFFER
// Save the old buffer state before exiting
and r3, r3, #MASK_LAST_BUFFER
@ -1047,6 +1061,9 @@ jitter_offset:
debug_value:
.word 0
ntsc_status:
.word 0
field_type_threshold:
.word 32000
elk_lo_field_sync_threshold:
@ -1756,11 +1773,11 @@ capture_line_normal_3bpp_table:
.word capture_line_inband_4bpp
.word capture_line_inband_8bpp
.word capture_line_default_4bpp
.word capture_line_ntsc_8bpp
.word capture_line_ntsc_8bpp_cga
.word capture_line_default_4bpp
.word capture_line_ntsc_8bpp_mono
.word capture_line_default_4bpp
.word capture_line_ntsc_8bpp_mono //no mono_auto in 3bpp mode
.word capture_line_ntsc_8bpp_mono //no mono_auto in 3bpp mode (won't work)
.word capture_line_default_double_4bpp
.word capture_line_default_double_8bpp
@ -1782,7 +1799,7 @@ capture_line_normal_6bpp_table:
.word capture_line_default_sixbits_4bpp // placeholder inband
.word capture_line_default_sixbits_8bpp // placeholder inband
.word capture_line_default_sixbits_4bpp
.word capture_line_ntsc_sixbits_8bpp
.word capture_line_ntsc_sixbits_8bpp_cga
.word capture_line_default_sixbits_4bpp
.word capture_line_ntsc_sixbits_8bpp_mono
.word capture_line_default_sixbits_4bpp

Wyświetl plik

@ -60,6 +60,7 @@ extern int sync_detected;
extern int last_sync_detected;
extern int jitter_offset;
extern int debug_value;
extern int ntsc_status;
extern int field_type_threshold;
extern int elk_lo_field_sync_threshold;

Wyświetl plik

@ -2363,7 +2363,7 @@ void setup_profile(int profile_changed) {
geometry_set_mode(mode7);
capinfo->palette_control = paletteControl;
if (capinfo->palette_control >= PALETTECONTROL_NTSCARTIFACT_CGA && ntsccolour == 0) {
if (capinfo->palette_control == PALETTECONTROL_NTSCARTIFACT_CGA && ntsccolour == 0) {
capinfo->palette_control = PALETTECONTROL_OFF;
}
log_debug("Loading sample points");
@ -2478,6 +2478,8 @@ void rgb_to_hdmi_main() {
}
}
resolution_warning = 0;
clear = BIT_CLEAR;
while (1) {
@ -2523,6 +2525,8 @@ void rgb_to_hdmi_main() {
}
if (powerup) {
ntsc_status = ntsccolour << 3;
powerup = 0;
if (check_file(FORCE_BLANK_FILE, FORCE_BLANK_FILE_MESSAGE)) {
update_cpld(BLANK_FILE);
@ -2685,9 +2689,10 @@ void rgb_to_hdmi_main() {
geometry_get_fb_params(capinfo);
capinfo->palette_control = paletteControl;
if (capinfo->palette_control >= PALETTECONTROL_NTSCARTIFACT_CGA && ntsccolour == 0) {
if (capinfo->palette_control == PALETTECONTROL_NTSCARTIFACT_CGA && ntsccolour == 0) {
capinfo->palette_control = PALETTECONTROL_OFF;
}
fb_size_changed = (capinfo->width != last_capinfo.width) || (capinfo->height != last_capinfo.height) || (capinfo->bpp != last_capinfo.bpp);
active_size_changed = (capinfo->chars_per_line != last_capinfo.chars_per_line) || (capinfo->nlines != last_capinfo.nlines);