mirror of
https://github.com/V2RetroComputing/analog-firmware.git
synced 2024-09-27 05:55:00 +00:00
Unified mono_rendering flag
In preparation for Video7 monochrome mode, add unified flag for mono rendering
This commit is contained in:
parent
9727add223
commit
08ba4e7911
@ -14,6 +14,7 @@ uint16_t text_border;
|
|||||||
|
|
||||||
compat_t machinefont = MACHINE_INVALID;
|
compat_t machinefont = MACHINE_INVALID;
|
||||||
bool userfont = false;
|
bool userfont = false;
|
||||||
|
bool mono_rendering = false;
|
||||||
|
|
||||||
uint16_t DELAYED_COPY_DATA(mono_colors)[14] = {
|
uint16_t DELAYED_COPY_DATA(mono_colors)[14] = {
|
||||||
_RGB(0x00, 0x00, 0x00), _RGB(0xFF, 0xFF, 0xFF), // White Normal
|
_RGB(0x00, 0x00, 0x00), _RGB(0xFF, 0xFF, 0xFF), // White Normal
|
||||||
@ -197,6 +198,8 @@ void DELAYED_COPY_CODE(render_loop)() {
|
|||||||
text_border = (palette == 0x6) ? text_fore : text_back;
|
text_border = (palette == 0x6) ? text_fore : text_back;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mono_rendering = ((soft_switches & SOFTSW_MONOCHROME) || (mono_palette & 0x8));
|
||||||
|
|
||||||
if(internal_flags & IFLAGS_TEST) {
|
if(internal_flags & IFLAGS_TEST) {
|
||||||
render_testpattern();
|
render_testpattern();
|
||||||
// Automatically dismiss the test pattern when the Apple II is seen.
|
// Automatically dismiss the test pattern when the Apple II is seen.
|
||||||
|
@ -65,7 +65,7 @@ static void DELAYED_COPY_CODE(render_dgr_line)(bool p2, uint line) {
|
|||||||
sl_pos++;
|
sl_pos++;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
if((soft_switches & SOFTSW_MONOCHROME) || (mono_palette & 0x8)) {
|
if(mono_rendering) {
|
||||||
while(i < 40) {
|
while(i < 40) {
|
||||||
while((dotc <= 18) && (i < 40)) {
|
while((dotc <= 18) && (i < 40)) {
|
||||||
color1 |= dgr_dot_pattern[((i & 1) << 4) | (line_bufb[i] & 0xf)] << dotc;
|
color1 |= dgr_dot_pattern[((i & 1) << 4) | (line_bufb[i] & 0xf)] << dotc;
|
||||||
|
@ -65,7 +65,7 @@ static void DELAYED_COPY_CODE(render_dhgr_line)(bool p2, uint line) {
|
|||||||
uint32_t pixeldata;
|
uint32_t pixeldata;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
if((soft_switches & SOFTSW_MONOCHROME) || (mono_palette & 0x8)) {
|
if(mono_rendering) {
|
||||||
while(i < 40) {
|
while(i < 40) {
|
||||||
// Load in as many subpixels as possible
|
// Load in as many subpixels as possible
|
||||||
while((dotc < 28) && (i < 40)) {
|
while((dotc < 28) && (i < 40)) {
|
||||||
|
@ -55,7 +55,7 @@ static void DELAYED_COPY_CODE(render_hires_line)(bool p2, uint line) {
|
|||||||
uint32_t pixeldata;
|
uint32_t pixeldata;
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
if((soft_switches & SOFTSW_MONOCHROME) || (mono_palette & 0x8)) {
|
if(mono_rendering) {
|
||||||
while(i < 40) {
|
while(i < 40) {
|
||||||
// Load in as many subpixels as possible
|
// Load in as many subpixels as possible
|
||||||
while((dotc < 18) && (i < 40)) {
|
while((dotc < 18) && (i < 40)) {
|
||||||
|
@ -79,7 +79,7 @@ static void DELAYED_COPY_CODE(render_lores_line)(bool p2, uint line) {
|
|||||||
sl2->data[sl_pos] = (text_border|THEN_EXTEND_3) | ((text_border|THEN_EXTEND_3) << 16); // 8 pixels per word
|
sl2->data[sl_pos] = (text_border|THEN_EXTEND_3) | ((text_border|THEN_EXTEND_3) << 16); // 8 pixels per word
|
||||||
sl_pos++;
|
sl_pos++;
|
||||||
|
|
||||||
if((soft_switches & SOFTSW_MONOCHROME) || (mono_palette & 0x8)) {
|
if(mono_rendering) {
|
||||||
for(i = 0; i < 40; i+=2) {
|
for(i = 0; i < 40; i+=2) {
|
||||||
color1 = lores_dot_pattern[line_buf[i] & 0xf] << 14;
|
color1 = lores_dot_pattern[line_buf[i] & 0xf] << 14;
|
||||||
color2 = lores_dot_pattern[(line_buf[i] >> 4) & 0xf] << 14;
|
color2 = lores_dot_pattern[(line_buf[i] >> 4) & 0xf] << 14;
|
||||||
|
Loading…
Reference in New Issue
Block a user