V2RetroComputing / analog

∀2 Analog VGA card for the Apple II computer line
MIT License
125 stars 18 forks source link

Configuration Utility not working #30

Open ThorstenBr opened 8 months ago

ThorstenBr commented 8 months ago

There are several issues with the configuration utility, so it is currently not working.

I have the following commits - fixing the issues, or at least demonstrating what the current issue is. This affects the firmware and the config utility itself:

For reference, if anyone wanted to already test this, I attached a ZIP with a local/experimental build (fw+config disk). This also contains a suggested fix for #31: analog_issue30.zip

rallepalaveev commented 8 months ago

Hi Thorsten,

I tried the new firmware and disk525a - and it works perfectly - changes the fonts and keeps them after reboot. Also after changing the machine.

I managed to change one of the fonts for the Pravetz clones, which was incorrect in the original firmware. The font is here: https://github.com/V2RetroComputing/analog/issues/29 In it, I have provided the correct font.

Thank you.

dkgrizzly commented 8 months ago

Thanks, I'll try to get these tested and merged in the next few days.

rallepalaveev commented 8 months ago

Hi guys,

I may have found one more bug, here is the description below:

I am using the firmware and configuration utility provided by Thorsten above in the top comment.

The firmware works normally and when I start A2Desktop - I get the double hires screen with the color switched off so the fonts are legible and all looks good.

However, if I write a configuration into the Pico using the configuration utility, then in double hires the color is on and fonts become illegible. I noticed that when I was changing fonts, but then even if I just save the config without changing anything - this effect appears. And there is no way for me to revert back the setting to switch on monochrome in double hires, unless I re-flash the Pico.

Another effect that I noticed linked to this is that upon initial flashing of the firmware, the small letters are replaced by numbers and symbols. Once a config is saved, even without changes, then the small letters appear correctly in place.

BR

ThorstenBr commented 7 months ago

@rallepalaveev : Which machine are you using to test A2Desktop/A2VGA - a IIgs? AFAIK only the IIgs had the register to enforce monochrome output. Now, the A2VGA firmware actually implements that register and it is also available in IIe mode (= so A2VGA actually adds a feature to the IIe). However, that doesn't help with A2Desktop, since A2D has code to detect a IIgs. And only uses the register to switch to monochrome output when it had detected a IIgs.

Concerning the small letters vs numbers/symbols: that is probably not related to config vs no config (=default config). It's probably related to another bug. The A2VGA firmware does not reset all the soft switches on reset. The Apple II IOU resets all soft switches on reset, so the A2VGA firmware needs to do the same, otherwise its shadowed settings may differ from the actual machine. So, sometimes it does depend on what software you have been running before - prior to pressing CTRL-RESET, since some of the settings remain set.

The effect you are seeing sounds like the "alternate character set" (also known as the "ALTCHAR" soft switch, or "mouse text") is incorrectly still enabled. This is also one of the soft switches which the A2VGA firmware only clears when it was power-cycled, otherwise this setting is preserved across system RESETs. I have added a local change to reset all the soft switches on RESET. You can test that here: v2-analog-lc-4ns-vga.zip

ThorstenBr commented 7 months ago

@rallepalaveev : Ok, I just noticed something I didn't know before. A2Desktop supports the Video7 card - which also had an option to disable color output. By default, the A2VGA firmware has Video7 support enabled. That's how the "internal_flags" variable is initialized in the firmware:

        volatile uint32_t internal_flags = IFLAGS_OLDCOLOR | IFLAGS_INTERP | IFLAGS_V7_MODE3;

So when no config is set, then the Video7 features are enabled. And A2Desktop successfully disables color output and switches to monochrome.

Now, when you write the first configuration with the config tool - without changing anything - then Video7 gets disabled by default. That's the default assumed in the config tool, when no configuration can be read from the card. So, afterwards A2D can no longer switch to monochrome...

In short: simply enable "Video7" in the config tool. And, yes, indeed there is an inconsistency between the tool and the firmware, due to different defaults, so the initial configuration changes the behavior, unless you toggle the V7 support.

rallepalaveev commented 7 months ago

Thank you Thorsten, this is helpful.

buserror commented 7 months ago

Just to confirm, in MII (Mii //e emulator) I simulated the 80COL/AN3 protocol and a2desktop uses that to set the monochrome. There are other programs that use it as well, like Total Replay -- which sets/reset the color mode for DHGR when loading previews/screenshots.