WIP: VIC-2020 MINIMON cartridge

Modding and Technical Issues

Moderator: Moderators

User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: WIP: VIC-2020 MINIMON cartridge

Post by pixel »

Mike wrote: Sun Mar 15, 2020 6:59 am MINIMON only uses workspace at rather unusual places, at the bottom of stack ($0100..$011E)
That's where BASIC would mess around while running programs, wouldn't it? In that case no debugging ML routines within BASIC programs for the unlucky?

Maybe I'm wrong as usual. Am getting a little light headed trying to understand the BASIC/KERNAL and it fills my heart with silent joy that Commodore fired Microsoft back then.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by Mike »

pixel wrote:That's where BASIC would mess around while running programs, wouldn't it? In that case no debugging ML routines within BASIC programs for the unlucky?
This does not pose any problem in practice. The two mentioned buffers have a "KEEP CLEAR!" written all over them, not primarily because of MINIMON, but because BASIC and KERNAL already use them at times which makes any data storage there volatile for the intents of most other machine code programs: $0100..$010F is used by the BASIC interpreter during FP->ASCII conversions, the KERNAL uses $0100 up to $013F to keep an error log during tape load operations. The buffer at $0200..$0258 holds the BASIC input line.

Now, MINIMON happens to have a good idea when these two buffers can be used without treading on the shoes of BASIC and KERNAL. ;) It also does not hold state there that needs to be kept across machine code calls (with the G command) and re-entry (by means of a BRK instruction breakpoint).
Maybe I'm wrong as usual.
No worries. At least there's someone who reads the docs and asks questions about an important design decision that went into the construction of MINIMON. :)

Some time ago, I did an example debugging session with MINIMON where the operation of a customized USR() function (calling BASIC fp routines!) was watched in-situ, see here: viewtopic.php?t=9770.
Am getting a little light headed trying to understand the BASIC/KERNAL and it fills my heart with silent joy that Commodore fired Microsoft back then.
At those times, Commodore managed to get an extended licence that allowed for architectural changes to the interpreter, but it's still a Microsoft BASIC. Witness the copyright notice in the C128 start-up screen:

Image

... so there.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by Mike »

in another thread, JonBrawn wrote:That was said in jest Mike, not as a serious comment, I'm definitely not going to steal your IP. I'm sorry if I offended or upset you, that wasn't my intention at all.
No worries. I was mainly pointing out what I thought should have been obvious anyway.
I've read the MINIMON thread, and it looks like there are the following features:
  • A monitor that cleverly avoids stomping on page zero and the BASIC workspace
  • A switch to redirect accesses that would have accessed the MINIMON ROM to access an external cartridge
The I/Ox selects do not go directly over said switch, the switch merely provides an enable signal for the I/Ox de-multiplex/route logic.

It is up to the informed user to decide when it is appropriate to map in MINIMON, or when it is necessary to set the switch to transparent so the firmware of the slave cartridge can access its own I/O registers.
  • A button to cause a hard reset
  • The ability to cause a hard reset and disable BLK5 "for a while".
Have I missed anything?
Plus, this freeze reset not only disables BLK5 for a short time (and with that, the cartridge autostart does not commence), it also opens and pulls high the reset line in the direction to the slave cartridge. The cartridge thus is oblivious a reset had happened and retains its state - especially of any registers associated with banking - so MINIMON can inspect cartridge memory in the configuration before the reset happened.

As far as the VFLI mods are concerned, I've only glanced over that thread and it looks like a hardware + software system. Am I right in believing that the hardware mod is in two parts - first make all of the lower 8KB of memory accessible to the VIC, and second add bank select logic to the color RAM area?
By your counting, there's actually a zeroth part - removing the original chips, setting sockets there instead (as is necessary with later VIC-20s, where all chips are soldered in), and testing the VIC-20 still works with the original chips (re-)equipped. My instructions actually count these as parts 1 to 3 though. :wink:
User avatar
JonBrawn
Vic 20 Devotee
Posts: 225
Joined: Sat Sep 11, 2021 10:47 pm
Website: http://youtube.com/@vicenary
Location: Austin TX USA
Occupation: CPU design engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by JonBrawn »

My instructions actually count these as parts 1 to 3 though.
Ah, yes, the off-by-one error. You get that a lot in computing...
Working on FPGA replacement for 6560/6561
https://youtube.com/@vicenary
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by Mike »

Mike wrote:[...] I'll have to wait until after the Xmas holidays for further commissioning. [...]
... and this happened yesterday, just a few days before the Easter holidays. :mrgreen:

Here's the pre-production release of the VIC-2020 MINIMON cartridge!

Image

Cheers,

Michael

P.S. there is enough room around the EPROM to accommodate for a ZIF socket as in the first PCB prototype. It is just 24-pin ZIF sockets do have long delivery times at the moment ... :?
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by Mike »

I operated MINIMON with one of my Mega-Carts for a comprehensive suite of tests. While doing so, I (re-)extracted the MC-specific version of TRON with a freeze reset:

Image

Unlike the original version as contained in my Games collection, the MC-version of TRON (download) is internationalized and features English or German instructions at the title screen.

With the page-wise ASCII memory display (one of MINIMON's transient tools) I also found a hidden game that appears at $7000 when VICMON at $6000 is activated. This happened to be yet another variant of City Crusher.

For completeness, here's a closeup of the controls:

Image
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Re: WIP: VIC-2020 MINIMON cartridge

Post by nbla000 »

Mike wrote: Sun Apr 17, 2022 5:11 am I operated MINIMON with one of my Mega-Carts for a comprehensive suite of tests. While doing so, I (re-)extracted the MC-specific version of TRON with a freeze reset:
You could ask me :wink:
With the page-wise ASCII memory display (one of MINIMON's transient tools) I also found a hidden game that appears at $7000 when VICMON at $6000 is activated. This happened to be yet another variant of City Crusher.
Yes, City Bomber, it is on the EXTRA section (F2 from the initial screen to access to this section)

I'm happy you still enjoy your Mega-Cart along with your MINIMON cartridge 8)
Mega-Cart: the cartridge you plug in once and for all.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by Mike »

nbla000 wrote:You could ask me.:wink:
For unknown reasons I did not keep a copy of the adjusted version. Anyway, extracting the game made an interesting test case for MINIMON.
Yes, City Bomber, it is on the EXTRA section (F2 from the initial screen to access to this section)
Indeed, there it is. I only searched in the cartridge and tape/disk games but missed out this one.
I'm happy you still enjoy your Mega-Cart along with your MINIMON cartridge. 8)
Yes, I operate my VIC-20 with MC and a C64SD most of the time.

A cartridge like Mega-Cart, with extra logic for RAM or ROM banking is a much more demanding test case than a standard RAM expansion. The I/O de-multiplex logic of the MINIMON cartridge ensures a minimal delay (only about 5 ns) on the I/O2 and I/O3 select signals when the switch is set to the "CART" position.

I expected MC to init its internal banking registers for "no RAM expansion" and "Mega-Cart firmware in BLK5" when it receives a hardware reset signal, either from its own reset circuit or from the VIC-20 reset circuit. In case of a MINIMON freeze reset, the reset line is opened and pulled high in direction to the cartridge in the extender - thus that cartridge, MC in particular, should keep its own selected RAM/ROM configuration prior to the freeze reset. That is exactly what happens: if I select "no RAM expansion" from the MC menu, a freeze reset keeps that (and puts me at the normal start-up banner of BASIC), if I select "+32K RAM" before, a freeze reset will keep the +32K RAM config as well, and if a cartridge game has been selected before, it is still mapped in after freeze reset. Then I set the switch to "MON" and inspect the cartridge memory. :)
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: WIP: VIC-2020 MINIMON cartridge

Post by chysn »

Mike wrote: Tue Apr 12, 2022 2:12 pm P.S. there is enough room around the EPROM to accommodate for a ZIF socket as in the first PCB prototype. It is just 24-pin ZIF sockets do have long delivery times at the moment ... :?
If you're going to start selling soon, a regular socket will probably be sufficient. How often are people really going to swap out MINIMON? Not very. Geez, I can hardly get 2732s that actually work. I've pretty much given up on 24-pin anything. MINIMON is likely to just stay there forever when I get my copy. :D
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: WIP: VIC-2020 MINIMON cartridge

Post by Mike »

To all concerned:

MINIMON has been released on sourceforge, under the CC-BY-SA 4.0 licence.

Greetings,

Michael
Post Reply