Getting a fully expanded VIC-20 on MAME?

You need an actual VIC.

Moderator: Moderators

Post Reply
hjalfi
Vic 20 Newbie
Posts: 6
Joined: Tue Apr 18, 2023 5:21 am
Website: http://cowlark.com
Location: zurich

Getting a fully expanded VIC-20 on MAME?

Post by hjalfi »

I feel embarrassed to ask this, but I can't find it anywhere else...

Does anyone know the right magic incantation to get a fully expanded (i.e. memory in all expansion blocks) VIC-20 in MAME? i.e. the equivalent of selecting all the RAM expansion options in Vice. The MAME documentation isn't brilliant, or as far as I can tell, there.
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Re: Getting a fully expanded VIC-20 on MAME?

Post by rhurst »

No worries, it is indeed cryptic, like it's Fkey mappings -- works like a real VIC in that VIC's F5 is really your keyboard's F3.

I am assuming you already know how to toggle MAME UI controls by pressing ScrLk key and then TAB to reveal Slot Devices menu option? If not, there you go.

If its command-line, then you must pay scrupulous attention to ordering. Here are examples:

Code: Select all

mame vic20 -listslots
mame vic20 -exp exp -exp:exp:slot1 3k -exp:exp:slot2 8k
mame vic20 -exp exp -exp:exp:fe3
There used to be a usable -ramsize option, but the only valid options remaining are 5K.
They still allow -quik option for quickload, i.e.,

Code: Select all

mame vic20 -exp exp -exp:exp:slot1 8k -quik quikman+8k.prg
...wait 3-seconds after READY prompt, type LIST, then RUN :P

Caveat: do not have the default option autosave 1 enabled, edit your mame.ini and change to 0 for disable.
Else, pass -noautosave option to avoid resuming into a former run state.
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
hjalfi
Vic 20 Newbie
Posts: 6
Joined: Tue Apr 18, 2023 5:21 am
Website: http://cowlark.com
Location: zurich

Re: Getting a fully expanded VIC-20 on MAME?

Post by hjalfi »

That's pretty cursed. I particular like "-exp exp -exp:exp", because we don't have enough exps..

So to make this work, I need:

- an VIC-1010 expander unit ("-exp exp").
- a 3kB VIC-1210 expansion ("-exp:exp:slot1 3k").
- a 16kB VIC-1111 expansion ("-exp:exp:slot2 16k"). Also, I think vic1111.com is a cult, but sadly unrelated.
- a 8kB VIC-1010 expansion ("-exp:exp:slot3 8k"), configured to be mapped to 0x6000.
- another 8kB VIC-1010 expansion ("-exp:exp:slot4 8k"), configured to be mapped at 0xa000.

Except I can't find out how to set the DIP switches from the command line, so I can't configure the expansion cards, and if I set it up manually in the GUI then MAME crashes.

I've also tried "-exp fe3" to use the Final Expander, but I'd rather not use that as it screws with the boot sequence; also, it still crashes.

It looks like the crash happens while my program is trying to write to colour RAM. I'll try upgrading MAME.
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Re: Getting a fully expanded VIC-20 on MAME?

Post by rhurst »

I should have read your question more closely in regards to wanting all RAM blocks assigned.
The internal UI allows for that, if you first assign the memory expanders into the slot expansion card first.
Then, go to dip switches menu option and alter them to occupy the address spaces and reset the machine (you can see it reports 28159 in the background):
mame_vic20.png
This will save your vic20 machine configuration as:

Code: Select all

$ cat .mame/cfg/vic20.cfg 
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="vic20">
        <image_directories>
            <device instance="cartridge1" directory="" />
            <device instance="cartridge2" directory="" />
            <device instance="cartridge3" directory="" />
            <device instance="cartridge4" directory="" />
            <device instance="cartridge5" directory="" />
            <device instance="cartridge6" directory="" />
            <device instance="cartridge7" directory="" />
            <device instance="cassette" directory="" />
            <device instance="floppydisk" directory="" />
            <device instance="quickload" directory="" />
        </image_directories>
        <input>
            <keyboard tag=":" enabled="1" />
            <port tag=":exp:exp:slot3:8k:SW" type="DIPSWITCH" mask="15" defvalue="7" value="13" />
            <port tag=":exp:exp:slot4:8k:SW" type="DIPSWITCH" mask="15" defvalue="7" value="14" />
        </input>
        <ui_warnings launched="1703033261" warned="1703033261">
            <feature device="vic20" type="graphics" status="imperfect" />
            <feature device="vic20" type="sound" status="imperfect" />
        </ui_warnings>
    </system>
</mameconfig>
As long as you pass the memory expanders into those EXPANSION slots, VIC will detect and use them. If you do NOT pass them, no problem, the emulator does not care and VIC will startup with what IS assigned, i.e.,

Code: Select all

mame vic20 -exp exp -exp:exp:slot1 3k
mame vic20 -exp exp -exp:exp:slot1 8k
mame vic20 -exp exp -exp:exp:slot1 16k
mame vic20 -exp exp -exp:exp:slot1 3k -exp:exp:slot2 8k
mame vic20 -exp exp -exp:exp:slot1 3k -exp:exp:slot2 16k
mame vic20 -exp exp -exp:exp:slot1 3k -exp:exp:slot2 16k -exp:exp:slot3 8k
mame vic20 -exp exp -exp:exp:slot1 3k -exp:exp:slot2 16k -exp:exp:slot3 8k -exp:exp:slot4 8k
You can decide if you want to pass a different -cfg_directory to point to different folders that may have completely different vic20.cfg machine profiles settings, including disk drives, printers, and any associated dip switch settings.
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
Post Reply