• Please review our updated Terms and Rules here

Franklin Ace 1200 and a2dvi HDMI question

kdkiser

Member
Joined
Apr 14, 2018
Messages
14
Hello all, I am running a stock Franklin Ace 1200 with the included dual interface (PR1 & PR2 virtual), 80-column (PR3), Z80 CPU (PR4) and floppy drive card (PR6) and all appear to be functioning normally.

I've verified the following functionality:
- 40 column mode without any installed cards
- 80 column mode in and out of CP/M
- Reading from sdisk2, formatting/reading/writing physical disks
- Was able to boot the ProDOS loader image from ADTPro through the dual-interface card (ADTPro itself would only give a black screen)
- a2dvi is accessible from the configuration tool, I can change fonts, colors, modes et cetra.

I have primarily used the a2dvi card though out my testing and it's worked wonderfully in 40 column mode. The issue I'm running into is I don't know how to get it to switch to 80-column mode. I can view 80-column mode through the analog video and continue to use the Franklin in analog mode but once PR#3 is ran the a2dvi stops responding; I assume this is because the computer is now writing to a different part of memory for display output. Is there a work around or modification to be made? Or, did I miss a configuration change? I do have VIDEX mode enabled, II+ US and VIDEX low character set selected.

V/R,
Kiser

Edit to add: I've used the a2dvi in PR2, it is currently in PR7 as to not conflict with the virtual serial port.
 
These a2vga/hdmi cards are based on one common pico design (I tried once one, but was not impressed), and the only workaraound would be to use a //e compatible computer with built-in 80 cols modes in its chipset that pico cards know about and can intercept and emulate.
 
I started digging into the A2DVI source code and compiling my own fork for the pi pico; I've successfully added a MACHINE_FRANKLIN to the enum list and setup the auto-detect to correctly identify either an Franklin Ace 1000 or 1200.

My initial issue is that the Ace 80 column display card does not use annunciator outputs that the Videx Videoterm would have; the a2dvi expects to see 0xC059 set in order to flag SOFTSW_VIDEX_80COL. I can force the SOFTSW_VIDEX_80COL flag as always true, however, no text displays. The cursor will move, which is encouraging.

I've grabbed a copy of the ROM from the monitor and used a dissaseembler to try to figure out what I can use to set the SOFTSW_VIDEX_80COL flag:

-Kiser

Per https://www.masswerk.at/6502/disassembler.html
Code:
                            * = $C300
C300   2C CB FF             BIT $FFCB
C303   70 04                BVS LC309
C305   38                   SEC
C306   90 18                BCC LC320
C308   B8                   CLV
C309   18         LC309     CLC
C30A   90 08                BCC LC314
C30C   31 30                AND ($30),Y
C30E   30 30                BMI LC340
C310   91 28                STA ($28),Y
C312   38                   SEC
C313   B8                   CLV
C314   8D FF CF   LC314     STA $CFFF
C317   8D F8 04             STA $04F8
C31A   8E 78 05             STX $0578
C31D   8C 78 04             STY $0478
C320   08         LC320     PHP
C321   20 91 C9             JSR $C991
C324   28                   PLP
C325   50 10                BVC LC337
C327   A9 10                LDA #$10
C329   85 38                STA $38
C32B   86 39                STX $39
C32D   A9 07                LDA #$07
C32F   85 36                STA $36
C331   86 37                STX $37
C333   20 00 C8             JSR $C800
C336   18                   CLC
C337   AD F8 04   LC337     LDA $04F8
C33A   B0 12                BCS LC34E
C33C   20 66 C8             JSR $C866
C33F   BD B8 04             LDA $04B8,X
C342   F0 57                BEQ LC39B
C344   38                   SEC
C345   E9 48                SBC #$48
C347   90 50                BCC LC399
C349   69 1F                ADC #$1F
C34B   18                   CLC
C34C   90 4D                BCC LC39B
C34E   AC 78 05   LC34E     LDY $0578
C351   F0 10                BEQ LC363
C353   88                   DEY
C354   AD 78 06             LDA $0678
C357   C9 88                CMP #$88
C359   F0 08                BEQ LC363
C35B   D9 00 02             CMP $0200,Y
C35E   D0 2E                BNE LC38E
C360   99 00 02             STA $0200,Y
C363   20 4D C8   LC363     JSR $C84D
C366   C9 9B                CMP #$9B
C368   F0 5C                BEQ LC3C6
C36A   C9 8D                CMP #$8D
C36C   D0 05                BNE LC373
C36E   48                   PHA
C36F   20 DE CA             JSR $CADE
C372   68                   PLA
C373   C9 95      LC373     CMP #$95
C375   D0 12                BNE LC389
C377   20 CB CB             JSR $CBCB
C37A   B0 05                BCS LC381
C37C   B9 00 CC             LDA $CC00,Y
C37F   90 03                BCC LC384
C381   B9 00 CD   LC381     LDA $CD00,Y
C384   09 80      LC384     ORA #$80
C386   AC F8 06             LDY $06F8
C389   8D 78 06   LC389     STA $0678
C38C   D0 08                BNE LC396
C38E   20 4D C8   LC38E     JSR $C84D
C391   A0 00                LDY #$00
C393   8C 78 06             STY $0678
C396   8D F8 04   LC396     STA $04F8
C399   A9 00      LC399     LDA #$00
C39B   85 24      LC39B     STA $24
C39D   BD 38 05             LDA $0538,X
C3A0   85 25                STA $25
C3A2   BD B8 06             LDA $06B8,X
C3A5   29 07                AND #$07
C3A7   C9 07                CMP #$07
C3A9   D0 11                BNE LC3BC
C3AB   BD B8 06             LDA $06B8,X
C3AE   29 F8                AND #$F8
C3B0   9D B8 06             STA $06B8,X
C3B3   20 93 FE             JSR $FE93
C3B6   20 22 FC             JSR $FC22
C3B9   20 89 FE             JSR $FE89
C3BC   AD F8 04   LC3BC     LDA $04F8
C3BF   AE 78 05             LDX $0578
C3C2   AC 78 04             LDY $0478
C3C5   60                   RTS
C3C6   20 4D C8   LC3C6     JSR $C84D
C3C9   20 41 C9             JSR $C941
C3CC   BD B8 06             LDA $06B8,X
C3CF   30 F5                BMI LC3C6
C3D1   10 90                BPL LC363
C3D3   53                   ???                ;%01010011 'S'
C3D4   43                   ???                ;%01000011 'C'
C3D5   20 41 29             JSR $2941
C3D8   0D 3B 0D             ORA $0D3B
C3DB   09 44                ORA #$44
C3DD   57                   ???                ;%01010111 'W'
C3DE   09 43                ORA #$43
C3E0   4C 52 45             JMP $4552
C3E3   4F                   ???                ;%01001111 'O'
C3E4   4C 2D 31             JMP $312D
C3E7   09 43                ORA #$43
C3E9   54                   ???                ;%01010100 'T'
C3EA   52                   ???                ;%01010010 'R'
C3EB   4C 20 53             JMP $5320
C3EE   48                   PHA
C3EF   49 46                EOR #$46
C3F1   54                   ???                ;%01010100 'T'
C3F2   20 4D 0D             JSR $0D4D
C3F5   3B                   ???                ;%00111011 ';'
C3F6   09 09                ORA #$09
C3F8   09 28                ORA #$28
C3FA   43                   ???                ;%01000011 'C'
C3FB   54                   ???                ;%01010100 'T'
C3FC   52                   ???                ;%01010010 'R'
C3FD   4C 20 53             JMP $5320
                            .END

;auto-generated symbols and labels
 LC309      $C309
 LC320      $C320
 LC314      $C314
 LC340      $C340
 LC337      $C337
 LC34E      $C34E
 LC39B      $C39B
 LC399      $C399
 LC363      $C363
 LC38E      $C38E
 LC3C6      $C3C6
 LC373      $C373
 LC389      $C389
 LC381      $C381
 LC384      $C384
 LC396      $C396
 LC3BC      $C3BC

C300: 2C CB FF 70 04 38 90 18
C308: B8 18 90 08 31 30 30 30
C310: 91 28 38 B8 8D FF CF 8D
C318: F8 04 8E 78 05 8C 78 04
C320: 08 20 91 C9 28 50 10 A9
C328: 10 85 38 86 39 A9 07 85
C330: 36 86 37 20 00 C8 18 AD
C338: F8 04 B0 12 20 66 C8 BD
C340: B8 04 F0 57 38 E9 48 90
C348: 50 69 1F 18 90 4D AC 78
C350: 05 F0 10 88 AD 78 06 C9
C358: 88 F0 08 D9 00 02 D0 2E
C360: 99 00 02 20 4D C8 C9 9B
C368: F0 5C C9 8D D0 05 48 20
C370: DE CA 68 C9 95 D0 12 20
C378: CB CB B0 05 B9 00 CC 90
C380: 03 B9 00 CD 09 80 AC F8
C388: 06 8D 78 06 D0 08 20 4D
C390: C8 A0 00 8C 78 06 8D F8
C398: 04 A9 00 85 24 BD 38 05
C3A0: 85 25 BD B8 06 29 07 C9
C3A8: 07 D0 11 BD B8 06 29 F8
C3B0: 9D B8 06 20 93 FE 20 22
C3B8: FC 20 89 FE AD F8 04 AE
C3C0: 78 05 AC 78 04 60 20 4D
C3C8: C8 20 41 C9 BD B8 06 30
C3D0: F5 10 90 53 43 20 41 29
C3D8: 0D 3B 0D 09 44 57 09 43
C3E0: 4C 52 45 4F 4C 2D 31 09
C3E8: 43 54 52 4C 20 53 48 49
C3F0: 46 54 20 4D 0D 3B 09 09
C3F8: 09 28 43 54 52 4C 20 53

1000003054.jpg
 
Last edited:
To reduce any errors from transcribing, I've dumped the ROMs U23 (program) and U24 (font) from my Ace 80-column [Video] card (Rev G, S/N E-17787). The U24 font ROM has a stamped label "U24 1331411", the U23 program ROM has printed label "1331424 .A" The font ROM does not seem to be utilized very much as seen in the first code block, the program ROM is much more interesting.

With the Ace 80 installed in peripheral slot 3, the 0xC300 - 0xC3FF memory window is located at 0x0600 in the U23 ROM file. The 0xC800 - 0xCFFE memory window starts at 0x0000 in the U23 ROM file.

-Kiser

Edit: Per the drawing, this is the "Video Card"

Code:
           00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000010   FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000020   00 00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00  ................
00000030   FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00  ................
00000040   00 00 00 00 00 00 FF FF FF 00 00 00 00 00 00 00  ................
00000050   FF FF FF 00 00 00 FF FF FF 00 00 00 00 00 00 00  ................
00000060   00 00 00 FF FF FF FF FF FF 00 00 00 00 00 00 00  ................
00000070   FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00  ................
00000080   E0 90 E0 9E F0 0C 02 1C 00 00 00 00 00 00 00 00  ààð...........
00000090   90 90 F0 90 BE 08 08 08 00 00 00 00 00 00 00 00  ð¾...........
000000A0   80 80 80 9E F0 18 10 10 00 00 00 00 00 00 00 00  ð...........
000000B0   88 88 50 20 3E 08 08 08 00 00 00 00 00 00 00 00  P >...........
000000C0   F0 80 C0 9E 90 18 10 10 00 00 00 00 00 00 00 00  ðÀ...........
000000D0   70 80 80 7C 12 1C 14 12 00 00 00 00 00 00 00 00  p|............
000000E0   70 80 60 10 EC 12 12 0C 00 00 00 00 00 00 00 00  p`.ì...........
000000F0   70 80 60 1E E4 04 04 0E 00 00 00 00 00 00 00 00  p`.ä...........

Code:
           00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000003F0   F1 60 09 4C 44 41 09 53 50 45 41 4B 52 0D 09 50  ñ`.LDA.SPEAKR..P
00000400   4C 41 0D 09 53 42 43 09 23 31 0D 09 42 4E 45 09  LA..SBC.#1..BNE.
00000410   2E 42 45 4C 4C 31 0D 3B 0D 09 52 54 53 0D 3B 0D  .BELL1.;..RTS.;.
00000420   1F 0D 3B 45 58 50 41 4E 53 49 4F 4E 20 43 4F 44  ..;EXPANSION COD
00000430   45 20 53 49 5A 45 20 45 52 52 4F 52 20 43 48 45  E SIZE ERROR CHE
00000440   43 4B 45 52 3A 0D 3B 0D 09 49 46 09 4E 4F 54 20  CKER:.;..IF.NOT
00000450   44 45 42 55 47 0D 09 49 46 09 28 2A 2D 45 58 50  DEBUG..IF.(*-EXP
00000460   43 4F 44 29 3E 28 24 43 43 30 30 2D 45 58 50 43  COD)>($CC00-EXPC
00000470   4F 44 29 0D 09 44 53 09 31 2F 30 0D 09 45 4E 44  OD)..DS.1/0..END
00000480   49 0D 09 45 4E 44 49 0D 3B 0D 1F 0D 3B 0D 09 45  I..ENDI.;...;..E
00000490   4E 44 0D 00 00 00 00 00 00 00 00 00 00 00 00 00  ND..............
 

Attachments

  • Ace 80 roms.zip
    Ace 80 roms.zip
    2.3 KB · Views: 2
  • Ace 80 schematic 1of2.jpg
    Ace 80 schematic 1of2.jpg
    1.2 MB · Views: 4
  • Ace 80 schematic 2of2.jpg
    Ace 80 schematic 2of2.jpg
    1.1 MB · Views: 4
Last edited:
It appears the VIDEX support was introduced in the meantime so your job is probably really trivial:


Yep, I didn't realize when I bought the A2DVI that I would need an 80-column card, but I had the one from Franklin! With the extent to which it was a clone I thought I would get lucky and just be plug-n-play; sadly, that did not happen. But it hasn't deterred me yet! I hope to be able to reuse the Videx code and only adjust the memory addresses that are monitored; unfortunately I'm not familiar with Apple ][s so it's a lot of trying to understand Apple ][s and Franklin's changes. If I can get it working, I think the Franklin Ace fonts would be a nice add-on too (I've dumped both the character ROMs already).

-Kiser
 

This is brilliant, I hadn't dug into the schematic yet but I did give it a try with a simple test and verified writing an odd address will cause the output to swap to 40-column mode. I attempted to write to CE00 from the monitor and notice a blip in the screen and realized it had to be a continuous write otherwise the routines called from $36,$37 will swap back to 80-column mode. The following code snipped will force 40-column mode:

Code:
10 POKE CE00, 1
20 GOTO 10

Therefore, an easy way to detect which mode to display! I'm still looking for a way to hook in similar to a2dvi.
  1. As-is stock code, the abus.c function 'apple2_softswitches' looks for a write (SET) to AN0 with a write to 0xC059 to trigger the VIDEX mode.
    1. I'll need to modify this to work the same way as I/O and Device Select logic unless I find an obvious code block
  2. Then, the address monitor in abus.c function 'bus_func_cxxx_read' sends any reads to 0xC8xx to the videx_vterm.c function 'videx_c8xx_read'
    1. I'll need to verify where the Franklin card reads
  3. In the videx_vterm.c function 'videx_c8xx_read', any read from 0xCE00 - 0xCEFF disables the Videx (80-column) mode
    1. This needs to be modified so that odd will disable and even can re-enable
  4. In render.c, function 'render_loop', SOFTSW_TEXT_MODE or SOFTSW_VIDEX_80COL need to be set in order to render to 80-column mode
  5. I also need to figure out how the output is written to the Franklin card, is it all even address writes only?
This abus.c function is what I'm focusing on
Code:
static inline void __time_critical_func(apple2_softswitches)(bool is_write, uint32_t address, uint32_t value)
{
    switch(address & 0x7f)
    {

    // ...

    case 0x58: // VIDEX80COLUMN: OFF
    // CLEAR AN0
        soft_switches &= ~SOFTSW_VIDEX_80COL;
        break;
    case 0x59: // VIDEX80COLUMN: ON
        if (videx_enabled)
        {
        // SET AN0
            soft_switches |= SOFTSW_VIDEX_80COL;
        }
        break;

    // ...
}

The above is what drives the renderer to swap modes.
Code:
    // show splash/diagnostic screen
    render_splash();

    for(;;)
    {
        // copy soft switches - since we need consistent settings throughout a rendering cycle
        uint32_t current_softsw = soft_switches;
        bool IsVidex = ((current_softsw & (SOFTSW_TEXT_MODE|SOFTSW_VIDEX_80COL)) == (SOFTSW_TEXT_MODE|SOFTSW_VIDEX_80COL));
        // ...
    }
    // ...

-Kiser
 

Attachments

  • Screen swap.jpg
    Screen swap.jpg
    159.9 KB · Views: 3
Last edited:
It looks to me your logic is wrong. A single access should be enough, there is even a D-trigger to memorzie it. I suppose another program code is resetting the card's state, could be its own ROM. Try to make a single access not from Basic, but from monitor. If that's not working make a short machine language program tham makes single access and then loops forever.
 
It looks to me your logic is wrong. A single access should be enough, there is even a D-trigger to memorzie it. I suppose another program code is resetting the card's state, could be its own ROM. Try to make a single access not from Basic, but from monitor. If that's not working make a short machine language program tham makes single access and then loops forever.
I initially tried just writing to 0xCE00 from monitor mode, but as you've suggested, the ZP input and output routines ($36-$37, $38-$39) point to 0xC3xx when in the Franklin's 80-column mode; those routines are preventing me from setting the D flip-flop as I'd want to. The basic script above is enough to cause the 40-column mode to be visible. Note: the video display data is preserved when swapping between 40 and 80 column modes on the Franklin hardware.

$36-$37 - Address of Output Routine (Default = F0, FD, 80-col = 07, C3)
$38-$39 - Address of Input Routine (Default = 1B, FD, 80-col = 10, C3)

To validate my assumptions, I first went into 80-column mode with the "PR#3" command, went in to monitor mode and dumped 0x700-0x707F to get something on screen, "Ctrl Z, 1" to exit 80-column mode. Back in 40-column mode, I wrote to 0xCFFF to disable all PROMs, wrote to 0xC300 to activate the IO select for PR#3, wrote to 0xC0B0 to activate Device Select. This should be all the required conditions to force the 80-column card to switch inputs... and with a write to 0xCE01, I was looking at the 80-column output of 0x7000-0x707F!
This works, because, "Ctrl Z, 1" reset the input/output routines to the defaults and negates the ROM routines in the 80-column card from over-writing the D flip flop, and the display RAM is on the 80-column card so the display data persists even when swapping modes.

See attached for proof, the left monitor is on the VGA version of an A2DVI (only displays 40-column mode), the right TV is displaying the analog output from the 80-column card (or 40-column mode of the onboard video depending on settings)

Edit to add: I have both the HDMI and VGA versions of the A2DVI, I'm focusing on the HDMI for now and I imagine porting to the VGA version will be easy. My motivation is that I do not have a CRT TV to enjoy the Ace 1200 on so I have to make do with more modern displays.

-Kiser
 

Attachments

  • 20241210_093943 - Copy.jpg
    20241210_093943 - Copy.jpg
    1.2 MB · Views: 6
Last edited:
Thanks, but why are you explaining me back what I advised you? I hardly need a proof for that :) I wish you luck with modifying the pico a2 code. I am fine with the the real uthentic hardware I have, still not having any pico myself. Is the new pico 5V tolerant on most of its i/o pins indeed, or had I misinterpreted its datasheet?
 
For those interested, here are the rendered font ROMs:
  • The ace80font is from the Franklin Ace 80 column card
  • Videx normal is clearly an inspiration for Ace 80 column, only missing the "DL" from 0x10.
  • the chr_rom is from the Franklin's color font card
  • II_US is the apple ][s font for reference
  • The graphics are ordered as 0x00 in the top left, 0x0-0xF are the first column, 0x10-0x1F would be the second column and so on...
  • The flashing characters appear to have a bit set in the first column of bits
The chr_rom was twice the size of the Apple ][ and I wasn't sure why, and wanted to see what the differences were, and I'm honestly not sure what I'm looking at either. This could be due to a misconfigured Arduino script extending the address range one bit past what was available. The obvious answer is I don't need to include the entire font ROM, just the first 0x0FF characters as 0x100 and above is garbled noise (maybe a snow font would be fun).
 

Attachments

  • ace80font.png
    ace80font.png
    15.9 KB · Views: 5
  • chr_rom.png
    chr_rom.png
    29.5 KB · Views: 6
  • II_US.png
    II_US.png
    15.9 KB · Views: 5
  • videx_normal.png
    videx_normal.png
    15.9 KB · Views: 3
Last edited:
Thanks, but why are you explaining me back what I advised you? I hardly need a proof for that :) I wish you luck with modifying the pico a2 code. I am fine with the the real uthentic hardware I have, still not having any pico myself. Is the new pico 5V tolerant on most of its i/o pins indeed, or had I misinterpreted its datasheet?
I don't think so, the A2DVI boards use a buffer to protect the RP2040. I don't think we'll see a mainstream 5V tolerant MCU again.
 
I don't think so, the A2DVI boards use a buffer to protect the RP2040. I don't think we'll see a mainstream 5V tolerant MCU again.
No need to think, there is a datasheet. The new pico 2 is RP2350.
 
Is the new pico 5V tolerant on most of its i/o pins indeed, or had I misinterpreted its datasheet?

You misinterpreted the datasheet. There are multiple discussions about this on the Raspberry Pi official forums; essentially the GPIO pins can tolerate have 5v on the pins when their IOVDD regulator is active and powered at 3.3v and the pins are floating. It isn't officially 5v tolerant, and if you had it in a circuit that might apply that voltage to the I/O pins without sequencing the startup to the IOVDD regulator activity you could definitely smoke it.
 
I am not misinterpreting -- you are. They don't have to be floating, they are 3.63V tolerant if IOVDD is not 3.3V. After IOVDD=3.3V then they are 5.5V tolerant.
 
I prefer to keep the magic smoke inside my chips, but the datasheet for the RP2040 seems to callout max of 4.13V for IO pins. Now I can confirm the LC254As cannot take 12V! My ALTCHR pin is permanently inoperable...

5.5.3.1. Absolute Maximum Ratings
ParameterSymbolMinimumMaximumUnitsComment
I/O Supply VoltageIOVDD-0.53.63V
Voltage at IOVPIN-0.5IOVDD + 0.5V
Note: Table 622. Absolute maximum ratings for digital IO (Standard and Fault Tolerant)
https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf
 
They may be cheap, but around me the space is free from that UK ARM mainstream, and I plan to remain clean. When I wrote "new pico" that meant "pico 2". If 2040 is new to you, that's a different story.
 
For the mean time, I have a working alpha release of the A2DVI (HDMI) firmware that adds support for the Franklin Ace 1000 and 1200!
  • This does include the Franklin's fonts as well.
  • The configuration disk will still function as normal.
  • This should not break anything on the Apple ][ side, the set machine function is updated to include Franklin detection.
  • The 80 column card is expected in PR Slot 3.
The big changes are:
  • Adding a Franklin machine configuration.
  • Updating the Videx disabled modes.
  • Removing a custom font slot for the Franklin's font.
  • The abus file was updated to include RAM writes below 0x400.
  • The Franklin's Ace 80 column display detection is based on the zero page's output pointer, if the pointer is 0xC307 then it's Franklin's Ace 80 mode.
Hope this helps someone else with a Franklin.

-Kiser

Edit to add, this has only been tested on a RP2040, I don't think A2DVI makers/sellers are shipping RP2350s at this time. (As of December 2024)

Can an admin update the thread title to solved?

https://github.com/kdkiser/A2DVI-Firmware
 
Back
Top