Final Expansion 3

Novità ottobre 2020: realizzato file loader autoconfigurante – Vedi qui.
Final Expasion 3 la periferica che non può mancare su un VIC 20. Questa periferica viene venduta da assemblare, con o senza contenitore non è molto economica pero è fantastica. Incopora una SD2IEC dispone di diverse configurazioni di memoria da 3 a 24 +3 KB – Fornisce un kernal che velocizza i caricamenti dal SD2IEC, preparando una scheda SD si possono caricare file prg, d64 e crt. Di questa periferica ne è stata fata una sorella minore, ugualmente funzionante ma priva dell’SD2IEC, ne può usare altre allo stesso modo, ma questo permette di ridurne i costi notevolmente. Si tratta della Final Expansion Alpha, leggi qui per saperne di più.

La scheda SD può essere letta tramite l’onnipresente programma in tutte le SD2IEC il File Browser chiamato appunto: FB, è da preferire quello da 8k quando possibile. Settando la scheda con mappatura di memora collegata al tasto funzione F5 (24+3 Kb) si dovrebbe essere in grado di far girare quasi tutti i programmi senza la nota incompatibilità tra le diverse espansioni, in particolare i programmi progettati senza espansione di memoria o con espansione di 3kb non giravano quando erano inserite espansioni di memori più capienti.
Questa funzione risolve quel problema, in molti casi.
Il vic vedrà sempre 28159 Bytes, l’interprete basic non vede e non può usare oltre quello, ma i 3kb saranno presenti e faranno appunto girare anche i programmi unexpanded o quelli 3kb.

Per utilizzare invece il caricatore della scheda, senza usare cioè il FB, è necessario che ogni cartella della SD contenga un file chiamato: loader.
Tale file conterrà le informazioni per ogni file contenuto nella sua radice, preparerà, quindi, la cartuccia per l’opportuna espansione al software prescelto, si occuperà, poi, di riavviare il VIC e lanciare il programma con la macchina configurata opportunatamente.
I files loader sono costruibili utilizzando il VIC, vedi il manuale, oppure uno strumento in linea di comando in ambiente windows: MKLOADER.


Mkloader costruisce automaticamente il file loader, è possibile anche editarlo manualmente.

MKLOADER è uno strumento da riga di comando Win32 che consente automaticamente di generare file di script LOADER da utilizzare con la Final Expansion 3 sul VIC20.

Genera file LOADER in base al contenuto della scheda SD.

Utilizza PETCAT e C1541 della distribuzione VICE e Exomizer di Magnus Lind. e sono inclusi nell’archivio zip.

Copia semplicemente tutti e 4 i file nel tuo “Percorso” e avvia MKLOADER nella root della tua scheda SD.

MKLOADER crea prima un file di testo “loader.bas” e poi lo tokenizza in un file
di programma VIC20 “LOADER”.

MKLOADER controlla se un file ha un’intestazione BASIC valida e quindi crea una voce in loader.bas con la configurazione necessaria e il comando + RUN.

Se il file non ha un’intestazione BASIC ma ha uno di questi indirizzi di caricamento: $ 4000, $ 5000, $ 6000, $ 7000, $ b0000
Una voce viene aggiunta con un comando SYS.

Se l’indirizzo è $ a000, vengono aggiunti i comandi + BLKP 0,1,2,3,5 e + RESET

Se viene rilevata un’immagine disco (d64, d71, d81), il primo file valido della directory viene aggiunto a LOADER oppure tutti i file validi dell’immagine disco possono essere aggiunti con l’opzione “/ A” – (per gestire, creare convertire file.D64 da windows puoi usare il software DirMaster, leggi qui).

In base all’opzione “/ T”: se un file di testo (.TXT / .NFO / .DIZ / .SEQ) è
rilevato, viene generato un eseguibile VIC20 che include un visualizzatore e il file
testo formattato in modo da poterlo leggere direttamente sul VIC20 dal caricatore della FE3.
Exomizer viene utilizzato per comprimere l’eseguibile.

Le directory che iniziano con un carattere “_” non vengono elaborate, può aiutare a proteggere un “ramo” temporaneamente dalla generazione dei file loader.

Se si desidera modificare il caricatore su PC prima di tokenizzarlo in un prg per VIC20:
– imposta l’opzione / K per mantenere i file “loader.bas”, in questo modo MKLOADER non lo eliminerà finito lo script;
– modifica il file loader.bas con il tuo editor di testo preferito e applica le tue modifiche;
– invoca petcat per tokenizzare loader.bas in un file LOADER:
questa l’istruzione: petcat -w2 -l 1201 -o LOADER – loader.bas
– Ovviamente è possibile costruire da zero il file loader.bas e poi elaborarlo come sopra descritto.

Opzioni MKLOADER:
—————–
Utilizzo: MKLOADER [/ S] [/ O] [/ I = nn] [/ K] [/ T] [/ A] [/ TAB = nn] [/?]

/ S Elabora tutta la struttura delle directory in modo ricorsivo (usare con cautela)
/ O Forza la sovrascrittura dei file “LOADER” esistenti
/ I = nn incremento della numerazione delle righe del caricatore (default = 10)
/ K Conserva i file “loader.bas” (vengono eliminati per impostazione predefinita)
/ T Crea visualizzatori eseguibili con testo di file (.TXT / .NFO / .DIZ / .SEQ)
/ A Elenca invece tutte le voci di immagine disco valide (nei file D64, D71, D81)
solo del primo
/ TAB = nn Lunghezza tabulazioni per visualizzatori di testo eseguibile (impostazione predefinita = 4)
/? Visualizza questo aiuto


La FE3 E’ dotata di 512Kb di flash interna dove è possibile salvare direttamente i giochi e caricarli come una cartuccia.

Per altre informazioni vedi anche:
Cartucce finali – Penultimate VS Final Expansion 3 Rev 11


The memory models 24K (F4) and 24+3K (F5) have the same start message and same amount of free memory is reported by the BASIC interpreter. The model 24+3 enables the 3K memory expansion in block 0. The BASIC interpreter of the VIC-20 cannot use the 3K expansion if a 8K expansion is active. You can use the 3K expansion for assembler programs or data blocks.


I modelli di memoria 24K (F4) e 24 + 3K (F5) hanno lo stesso messaggio di avvio e la stessa quantità di memoria libera è riportata dall’interprete BASIC. Il modello 24 + 3 abilita l’espansione di memoria 3K nel blocco 0. L’interprete BASIC del VIC-20 non può usare l’espansione 3K se è attiva un’espansione 8K.
È possibile utilizzare l’espansione 3K per programmi assembler o blocchi dati.


It is worth spending a few minutes studying the memory map, here given with addresses given in hexadecimal.

$0000 System RAM (1K)

$0400 Empty space for 3K memory expansion

$1000 BASIC RAM (3.5K)

$1E00 Screen matrix (0.5K)

$2000 Empty space for first block of 8K memory expansion

$4000 Empty space for second block of 8K memory expansion

$6000 Empty space for third block of 8K memory expansion

$8000 Character ROM (4K)

$9000 I/O space for VIC chip, VIAs etc (4K space of which only parts are used)

$A000 RAM/ROM cartridge space, 8K

$C000 BASIC ROM (8K)

$E000 KERNAL ROM (8K)

Memory expansions know which slot they go into by using different fingers on the cartridge connector. Most cartridge games go into $A000 and autostart. Some games are 16K and are divided into $6000 and $A000, occasionally they instead use $2000 + $A000. Scott Adams’ text adventures go into $4000 + $6000 and thus require a SYS to start.

Some memory expansions are switchable, meaning you can configure which slots they should map into. A so-called 32K memory expansion fills all the three slots $2000, $4000, $6000 plus the RAM/ROM slot at $A000 which means you can load dumped cartridge games into RAM and SYS 64802 to start the game, assuming it doesn’t contain copy protection and will overwrite itself.

The 3K slot is a little oddity of itself. As you can see, it resides in an own part of memory. Most switchable expansions enable this room too.

The fact that addresses for the screen matrix, start of BASIC, end of variables etc are reorganized is due to the screen matrix always must reside within the 4K of built-in RAM at $1000, and that BASIC doesn’t like to have a partitioned workspace. For 3K expansion, it is a simple matter of moving start of BASIC down by 3072 bytes but for 8K or more expansion, the screen matrix moves from $1E00 to $1000, start of BASIC moves from $1000 to $1200 and then you have up to 27.5K of continuous memory. The RAM/ROM slot at $A000 can never be part of continuous memory, but it is fully possible to configure BASIC to entirely operate in that slot anyway, if you need to for some reason.

This reorganization is not exclusive to games in BASIC, programs in machine code would have the same and even worse issues if you e.g. load an unexpanded game while you have a 3K or 8K expansion plugged in, as addresses in machine code tend to be absolute and would mismatch quite a bit unless you load the code into the exact same position as intended.

For that matter, those 64K RAM expansions are very rare and would as far as I understand involve a bit of bank switching so they’re not practically relevant.

When it comes to buying an expansion memory, look for one that is switchable. The more options, the better. Commodore’s own VIC-1110 (8K) and VIC-1111 (16K) memory cartridges internally have jumper pads for each block of 8K so with a bit of hacking, you can add switches on the outside to convert one of those to map into either 8K block of your liking, including the block at $A000. However for the 16K cartridges, you need to know which blocks the files go into, which usually is included in the file name.


At the July 29-30 Commodore Vegas Expo v13 (CommVEx), Robert Bernardo of the Fresno Commodore User Group gives a brief presentation on the VIC-20 cartridge, the Final Expansion 3. The FE3 can be ordered from Heather — see

FE3 INSPECTOR

FE3 INSPECTOR is a memory browser/manipulator for the Final Expansion 3 (FE3). The Final Expansion 3 is a cartridge with 512KB RAM and FLASH ROM on board. With Finspector you can do the following:

  • browse FE3 memory (both RAM and FLASH ROM)
  • switch/cycle through all possible FE3 memory modes
  • edit / overwrite RAM and FLASH memory (both in char and hex mode)
  • erase/reset the entire FLASH chip (512KB)
  • erase/reset one of the 8 FLASH chip sectors (64KB each)

FE3 has two memory modes: banked and block modes. Cycle though both types of modes with keys ‘n’ and ‘m’. In banked mode the normal ‘character’ layout looks like this:

Top right is the selected memory mode. Top left is the current VIC memory location. This maps to the memory address on the FE3 below right. Below left are the raw contents of the two FE3 registers $9c02/$9c03. ‘Hide’: displays the visibility for BLK0/1/2/3/5.

In block mode the address location is replaced by the current memory page. Also the selected modes for BLK0/1/2/3/5 become visible. The behaviour of these BLK modes is different for each block mode.

This is the same screen in hex mode. ‘left arrow’ toggles you in or out of edit mode, where you can change individual bytes (in char mode you may type characters).

Caveat with editing flash memory: in  flash memory you can only ‘turn bits off’. Erased flash memory is populated with ‘FF FF FF FF’. You can change these values to whatever you like, but you can only change them back to FF trough a flash erase cycle. This behavior works on the bit level, so you can for example change ’38’ to ’30’, but not the other way around.

Flash erase screen. In flash mode you can choose to erase a flash sector of 64kb (there are obviously 8 of them) or the entire chip (512kb). Use keys S or A. This will of course destroy all or parts of your flash contents, so use with care! If you want to toy with this keep a copy of the official firmware on the built-in uIEC drive, so that you can quickly re-install it.The official firmware is installed on flash memory location $005000-$007FFF which is located in in sector 0. So you can safely erase sector 1-7 without destroying the firmware itself. FE3 memory modes#BANK MODES:FEMOD_ROM       = $40  ;MODE EEPROM (READ EEPROM, WRITE RAM)
FEMOD_ROM_P     = $20  ;MODE FLASH EEPROM (READ EEPROM, WRITE EEPROM)
FEMOD_SRAM      = $A0  ;MODE BIG SRAM (SRAM 512KB, BANK 0 TO 15)
#BLOCK MODES:FEMOD_RAMROM    = $60   ;MODE RAM/ROM  (READ EEPROM, WRITE RAM)FEMOD_RAM       = $80   ;MODE SRAM (SRAM 40KB, BANK 0 and BANK 1)FEMOD_RAM2      = $C0   ;MODE RAM 2 (SRAM 512KB, BANK 0 TO 15)FEMOD_START     = $00   ;START MODE(This information is also contained in source file inc/fe3_registers.a.)DownloadsDownload finspector10.zip compiled + source from the file directory (see link on top of this page). FE3 Inspector needs at least some expanded memory enabled. It will load from $1201 to $1c04 which is within ‘standard’ VIC-20 memory, so you can’t swap it out by mistake. When loaded with the FE3 wedge turned on, the program may be unresponsive and registers are locked on ‘$9c/9c’. Please press runstop+restore and run again. Thanks go out to the creators of this excellent device, most of all diddl. I also built on the code of his firmware flasher, and of course needed the documentation on his site vc20final.t-winkler.net/.
Last Updated on Sunday, 02 May 2010 22:56

Site design by 3583 BYTES FREE.


Mia idea per speciale “Loader” per espansione “Alpha” o FE3per non doveer scrivere “quando possibile”il “loader” classico che e’ molto complesso e complicato. Loader speciale carica ed esegue solo il “Menu disco” vedi fig1. La fig 2 mostra il risultato del menu’ ottenuto.
I file si possono aggiungere nella sd senza modificare il loader “complicato”.

Da provare e dirmi cosa ne pensate. Armando



Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *