Page 4 of 4

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Wed Jan 05, 2022 9:21 pm
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.

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Thu Jan 06, 2022 1:33 am
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.

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Sat Jan 15, 2022 6:57 pm
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:

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Fri Jan 21, 2022 12:43 am
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...

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Tue Apr 12, 2022 2:12 pm
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 ... :?

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Sun Apr 17, 2022 5:11 am
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

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Tue Apr 19, 2022 3:21 am
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)

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Wed Apr 20, 2022 3:05 am
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. :)

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Wed Apr 20, 2022 10:14 am
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

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Fri Apr 19, 2024 10:50 am
by Mike
To all concerned:

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

Greetings,

Michael

Re: WIP: VIC-2020 MINIMON cartridge

Posted: Thu May 16, 2024 10:59 am
by Mike
Here is the draft of the first hardware design, should anyone want to replicate the prototype cartridge shown in the introductory post of the thread using a VIC-1210 +3K RAM expansion as carrier:

Code: Select all

        2716
    +----\/----+
 1 -|A7     Vcc|- 24
 2 -|A6      A8|- 23
 3 -|A5      A9|- 22
 4 -|A4     Vpp|- 21
 5 -|A3     /OE|- 20
 6 -|A2     A10|- 19
 7 -|A1     /CS|- 18
 8 -|A0      D7|- 17
 9 -|D0      D6|- 16
10 -|D1      D5|- 15
11 -|D2      D4|- 14
12 -|GND     D3|- 13
    +----------+

- open pad 12 lower
- close pad 12 upper, connect Pin 21 (Vpp) to +5V

- open pad 5 (-> pin 20 upper chip, /OE)
- open pad 11 upper (-> pins 18 upper and lower chip, /CS)

/CS := /I/O2 & /I/O3 == //(/I/O2 & /I/O3) -> to pad 11, right
/OE := /(CR/W & SO2)                      -> to pad 5, right
You find the firmware here.