Skip to content

Commit bddd891

Browse files
committed
Videx: menu configuration and documentation.
1 parent 5d65f67 commit bddd891

File tree

8 files changed

+83
-22
lines changed

8 files changed

+83
-22
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,20 @@ but uses an unused 8th data bit to switich to a 560pixel/line monochrome resolut
180180
Another example showing the Video7 16color with hires monochrome pixel mix mode:
181181
![Video7](images/A2DVI_Video7_DHGR2.jpg)
182182

183+
## Videx Support
184+
Stock Apple IIs did not support 80 column display.
185+
A popular extension were "Videx" video cards, which provided 80 column support - and support for various character sets.
186+
187+
A2DVI is able to display the Videx 80 column video mode on an Apple II.
188+
Enable the Videx support by selecting the Videx character set in the menu (US, German, French, Spanish, ...).
189+
190+
The Videx support of A2DVI is currently "passive" only:
191+
192+
* You need to have an original Videx card plugged into slot 3 of your Apple II (the original card provides a ROM, registers and additional RAM to your Apple II).
193+
* Plug your A2DVI card in any other slot.
194+
195+
![A2DVI Videx](images/A2DVI_Videx.jpg)
196+
183197
## Debug Monitor
184198
The configuration menu offers a debugging feature. Enabling the "**DEBUG MONITOR**" shows extra lines above and below the normal Apple II screen (in red):
185199

@@ -251,6 +265,7 @@ Firmware updates of an A2DVI card are easy and safe:
251265

252266
* **40/80 column text modes** for Apple IIe
253267
* **40 column text mode** for Apple II
268+
* **VIDEX 80 column text** for Apple II
254269
* **LORES graphics mode**
255270
* **Double-LORES graphics mode**
256271
* **HIRES graphics mode**

firmware/config/config.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ volatile bool language_switch = false; // false: main/local char set, true:
4141
volatile bool enhanced_font_enabled;
4242
volatile uint8_t reload_charsets = 4;
4343

44+
uint8_t cfg_videx_selection = 0; //0:DISABLED
4445
uint8_t cfg_local_charset = 0;
45-
uint8_t cfg_alt_charset = 0;
46+
uint8_t cfg_alt_charset = 0;
4647
uint32_t invalid_fonts = 0xffffffff;
4748
volatile uint8_t color_mode = 1;
4849
rendering_fx_t rendering_fx = FX_ENABLED;
@@ -82,7 +83,7 @@ struct __attribute__((__packed__)) config_t
8283

8384
uint8_t test_mode_enabled;
8485
rendering_fx_t rendering_fx;
85-
uint8_t videx_enabled;
86+
uint8_t videx_selection;
8687

8788
// Add new fields after here. When reading the config use the IS_STORED_IN_CONFIG macro
8889
// to determine if the field you're looking for is actually present in the stored config.
@@ -263,11 +264,11 @@ void DELAYED_COPY_CODE(config_load_charsets)(void)
263264
}
264265
}
265266

266-
if (reload_charsets & 4)
267+
if ((reload_charsets & 4)&&(cfg_videx_selection>0))
267268
{
268269
// videx character sets
269-
memcpy32(character_rom_videx_normal, character_roms_videx[0], CHARACTER_ROM_SIZE);
270-
memcpy32(character_rom_videx_inverse, character_roms_videx[1], CHARACTER_ROM_SIZE);
270+
memcpy32(character_rom_videx_normal, character_roms_videx[cfg_videx_selection-1], CHARACTER_ROM_SIZE);
271+
memcpy32(character_rom_videx_inverse, videx_inverse, CHARACTER_ROM_SIZE);
271272
}
272273

273274
reload_charsets = 0;
@@ -300,7 +301,11 @@ void config_load(void)
300301
SET_IFLAG(cfg->video7_enabled, IFLAGS_VIDEO7);
301302
SET_IFLAG(cfg->debug_lines_enabled, IFLAGS_DEBUG_LINES);
302303
SET_IFLAG(cfg->test_mode_enabled, IFLAGS_TEST);
303-
SET_IFLAG((IS_STORED_IN_CONFIG(cfg, videx_enabled) && cfg->videx_enabled), IFLAGS_VIDEX);
304+
if (IS_STORED_IN_CONFIG(cfg, videx_selection))
305+
{
306+
cfg_videx_selection = cfg->videx_selection;
307+
SET_IFLAG(cfg_videx_selection>0, IFLAGS_VIDEX);
308+
}
304309
if(IS_STORED_IN_CONFIG(cfg, rendering_fx))
305310
{
306311
rendering_fx = cfg->rendering_fx;
@@ -330,9 +335,8 @@ void config_load_defaults(void)
330335
SET_IFLAG(1, IFLAGS_SCANLINEEMU);
331336
SET_IFLAG(0, IFLAGS_DEBUG_LINES);
332337
SET_IFLAG(0, IFLAGS_FORCED_MONO);
333-
SET_IFLAG(0, IFLAGS_VIDEO7);
338+
SET_IFLAG(1, IFLAGS_VIDEO7);
334339
SET_IFLAG(0, IFLAGS_TEST);
335-
SET_IFLAG(0, IFLAGS_VIDEX);
336340
rendering_fx = FX_ENABLED;
337341
config_setflags();
338342

@@ -345,6 +349,8 @@ void config_load_defaults(void)
345349

346350
cfg_local_charset = DEFAULT_LOCAL_CHARSET;
347351
cfg_alt_charset = DEFAULT_ALT_CHARSET;
352+
cfg_videx_selection = 0;
353+
SET_IFLAG((cfg_videx_selection>0), IFLAGS_VIDEX);
348354

349355
// reload both character sets
350356
reload_charsets |= 3;
@@ -368,7 +374,7 @@ void DELAYED_COPY_CODE(config_save)(void)
368374
new_config->video7_enabled = IS_IFLAG(IFLAGS_VIDEO7);
369375
new_config->debug_lines_enabled = IS_IFLAG(IFLAGS_DEBUG_LINES);
370376
new_config->test_mode_enabled = IS_IFLAG(IFLAGS_TEST);
371-
new_config->videx_enabled = IS_IFLAG(IFLAGS_VIDEX);
377+
new_config->videx_selection = cfg_videx_selection;
372378
new_config->rendering_fx = rendering_fx;
373379
new_config->color_mode = color_mode;
374380
new_config->machine_type = cfg_machine;

firmware/config/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ extern bool input_switch_state;
7878
extern uint32_t invalid_fonts;
7979
extern uint8_t cfg_local_charset;
8080
extern uint8_t cfg_alt_charset;
81+
extern uint8_t cfg_videx_selection;
8182
extern volatile uint8_t reload_charsets;
8283

8384

firmware/fonts/textfont.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ const uint8_t* DELAYED_COPY_DATA(character_roms)[32] =
6363
CUSTOM_FONT_ROM(15)
6464
};
6565

66-
const uint8_t* DELAYED_COPY_DATA(character_roms_videx)[11] =
66+
const uint8_t* DELAYED_COPY_DATA(character_roms_videx)[VIDEX_FONT_COUNT] =
6767
{
6868
videx_normal,
69-
videx_inverse,
7069
videx_uppercase,
7170
videx_german,
7271
videx_french,

firmware/fonts/textfont.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ extern uint8_t __font_roms_start[];
4747
#define CUSTOM_FONT_ROM(i) (&__font_roms_start[(i)*CHARACTER_ROM_SIZE])
4848

4949
extern const uint8_t* character_roms[MAX_FONT_COUNT];
50-
extern const uint8_t* character_roms_videx[11];
50+
#define VIDEX_FONT_COUNT 10
51+
extern const uint8_t* character_roms_videx[VIDEX_FONT_COUNT];
5152

5253
extern const uint8_t textfont_iie_us_enhanced[256 * 8];
5354
extern const uint8_t textfont_iie_us_unenhanced[256 * 8];

firmware/menu/menu.c

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SOFTWARE.
3535
#include "menu.h"
3636

3737
// number of elements in the menu
38-
#define MENU_ENTRY_COUNT (17)
38+
#define MENU_ENTRY_COUNT (18)
3939

4040
// number of non-config elements in the two column menu area
4141
#define MENU_ENTRIES_NONCFG (6)
@@ -245,6 +245,21 @@ const char* DELAYED_COPY_DATA(MenuFontNames)[MAX_FONT_COUNT] =
245245
"CUSTOM FONT 16"
246246
};
247247

248+
const char* DELAYED_COPY_DATA(MenuVidex)[VIDEX_FONT_COUNT+1] =
249+
{
250+
"DISABLED", //0
251+
"US", //1
252+
"UPPERCASE", //2
253+
"GERMAN", //3
254+
"FRENCH", //4
255+
"SPANISH", //5
256+
"KATAKANA", //6
257+
"APL", //7
258+
"SUPER SUB", //8
259+
"EPSON", //9
260+
"SYMBOL" //10
261+
};
262+
248263
static void menuOption(uint8_t y, uint8_t Selection, const char* pMenu, const char* pValue)
249264
{
250265
uint x = (Selection >= (MENU_OFS_NONCFG+3)) ? 20:0;
@@ -577,6 +592,26 @@ bool DELAYED_COPY_CODE(menuDoSelection)(bool increase)
577592
}
578593
break;
579594
case 10:
595+
if (increase)
596+
{
597+
if (cfg_videx_selection < VIDEX_FONT_COUNT)
598+
{
599+
cfg_videx_selection++;
600+
reload_charsets |= 4;
601+
}
602+
}
603+
else
604+
{
605+
if (cfg_videx_selection > 0)
606+
{
607+
cfg_videx_selection--;
608+
if (cfg_videx_selection > 0)
609+
reload_charsets |= 4;
610+
}
611+
}
612+
SET_IFLAG((cfg_videx_selection>0), IFLAGS_VIDEX);
613+
break;
614+
case 11:
580615
SET_IFLAG(!IS_IFLAG(IFLAGS_DEBUG_LINES), IFLAGS_DEBUG_LINES);
581616
SET_IFLAG(0, IFLAGS_TEST);
582617
break;
@@ -651,9 +686,12 @@ static inline bool menuCheckKeys(char key)
651686
if ((!LANGUAGE_SWITCH_ENABLED())&&(CurrentMenu == 4))
652687
CurrentMenu = 3;
653688
break;
654-
case 'D':
689+
case 'X':
655690
CurrentMenu = 10;
656691
break;
692+
case 'D':
693+
CurrentMenu = 11;
694+
break;
657695
case 'R':
658696
CurrentMenu = MENU_OFS_NONCFG+0;
659697
Cmd = 1;
@@ -809,15 +847,16 @@ void DELAYED_COPY_CODE(menuShow)(char key)
809847

810848
menuOption(13,8, "8 ANALOG RENDER FX:", MenuRendering[rendering_fx]);
811849
menuOption(14,9, "9 VIDEO7 MODES:", MenuOnOff[IS_IFLAG(IFLAGS_VIDEO7)]);
812-
menuOption(15,10, "D DEBUG MONITOR:", MenuOnOff[IS_IFLAG(IFLAGS_DEBUG_LINES)]);
850+
menuOption(15,10, "X VIDEX CHARSET:", MenuVidex[cfg_videx_selection]);
851+
menuOption(16,11, "D DEBUG MONITOR:", MenuOnOff[IS_IFLAG(IFLAGS_DEBUG_LINES)]);
813852

814-
menuOption(17,11, "R RESTORE DEFAULTS", 0);
815-
menuOption(18,12, "L LOAD FROM FLASH", 0);
816-
menuOption(19,13, "S SAVE TO FLASH", 0);
853+
menuOption(18,12, "R RESTORE DEFAULTS", 0);
854+
menuOption(19,13, "L LOAD FROM FLASH", 0);
855+
menuOption(20,14, "S SAVE TO FLASH", 0);
817856

818-
menuOption(17,14, "A ABOUT", 0);
819-
menuOption(18,15, "B DEBUG", 0);
820-
menuOption(19,16, "T TEST", 0);
857+
menuOption(18,15, "A ABOUT", 0);
858+
menuOption(19,16, "B DEBUG", 0);
859+
menuOption(20,17, "T TEST", 0);
821860

822861
// show some special characters, for immediate feedback when selecting character sets
823862
printXY(40-11, 21, "[{\\~#$`^|}]", PRINTMODE_NORMAL);

firmware/test/tests.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void test_videx()
488488
simulateWrite(0xc300, 0);
489489
for (uint32_t b=0;b<0x200;b++)
490490
{
491-
simulateWrite(0xcc00+b, '0'+bank);//b&0xff);
491+
simulateWrite(0xcc00+b, b&0xff);
492492
}
493493
}
494494

images/A2DVI_Videx.jpg

148 KB
Loading

0 commit comments

Comments
 (0)