modded VIC 20 kernals?

Discuss anything related to the VIC
Post Reply
Overdoc
Vic 20 Amateur
Posts: 41
Joined: Mon Jul 14, 2008 12:00 pm
Location: Austria

modded VIC 20 kernals?

Post by Overdoc »

I wonder if there are any modded VIC 20 kernals around?
Apart from Jiffydos as well as the Dead-Test and Ram-Test kernals (which are for diagnostics, only) I am not aware of any others?

I am thinking about some mods like a built-in memory monitor (like the one from C64's Dolphindos?), or a built-in turbo tape (ok, due to smaller VIC files maybe not so much useful than on the C64), disk drive useage enhancements, etc.
Ofcourse Jiffydos is already offering many additions, but maybe they would be more?

If used together with the original kernal and the option to switch kernals without crashing the VIC, it would be cool to use different kernals for different tasks.
e.g. load some big VIC 20 program into memory with a disk or tape speeder kernal, then switch over to another kernal with built-in monitor to change some bytes, the switch over to the original kernal to test it running, etc., etc.

I wonder what's your opinion about this and if there are maybe already some VIC kernals I am not aware of?
Overdoc
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: modded VIC 20 kernals?

Post by srowe »

Without adding some form of bank-switching you would have to remove some functionality (as JiffyDOS does). That then prevents you from switching it while the computer is running. There's too much code that presumes it can use any part of the KERNAL, not just the public entrypoints, having any alternative code in that block is just going to cause compatibility issues.
Overdoc
Vic 20 Amateur
Posts: 41
Joined: Mon Jul 14, 2008 12:00 pm
Location: Austria

Re: modded VIC 20 kernals?

Post by Overdoc »

Well, maybe there are some major differences in the designs of the VIC 20 and C64 kernals, but on a C64 I can switch between Jiffydos, normal system, Dolphindos, Prologicdos, Speeddos, TurboTape Kernal, etc, etc. without the computer crashing, even though there is ofcourse functionality removed in all of those modified kernals. (most of them remove the RS232 and standard tape loading functions)

I understand that switching without crashing might not be possible at any time, from within any running application, but imho that also wouldn't be needed. At least for kernals which speed up disk or tape transfer it would be a benefit if switching was possible in 'idle mode', for instance switching back to normal system after having used an alternative kernal for loading (from disk or tape)

Another idea that just came to my mind would be a modified kernal, which makes the VIC20 compatible with a 1541 drive?
Since it is possible to set a 1541 into 1540 mode just via it's DOS rom, I guess that the same (speed?) adjustment could be made possible on the VIC 20's kernal rom to make the VIC 1541 compatible??
Overdoc
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: modded VIC 20 kernals?

Post by srowe »

Overdoc wrote: Thu Mar 14, 2024 7:18 am Another idea that just came to my mind would be a modified kernal, which makes the VIC20 compatible with a 1541 drive?
There's no compatibility problem between the VIC-20 and a 1541. The UI+/- allows you to recover the transfer speed loss that had to be added for compatibility with the C64.
Overdoc
Vic 20 Amateur
Posts: 41
Joined: Mon Jul 14, 2008 12:00 pm
Location: Austria

Re: modded VIC 20 kernals?

Post by Overdoc »

Thanks for the correction, you are right, it is the other way round, the C64 is not compatible with the 1540 drive, but the VIC is compabiel with the 1541 anyway, also without switching it back to 1540 mode.
So there is no need for kernal modding :)
Overdoc
Merytsetesh
Vic 20 Amateur
Posts: 40
Joined: Sat Mar 02, 2024 8:57 pm
Location: Canada

Re: modded VIC 20 kernals?

Post by Merytsetesh »

If I had one mod for the VIC KERNAL, it would be to amend the screen routines to take account of variable dimensions instead of relying on the hardcoded values... :P
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: modded VIC 20 kernals?

Post by tokra »

Merytsetesh wrote: Thu Mar 14, 2024 12:21 pm If I had one mod for the VIC KERNAL, it would be to amend the screen routines to take account of variable dimensions instead of relying on the hardcoded values... :P
You do not need a new kernal for that: http://sleepingelephant.com/ipw-web/bul ... php?t=8375

Apart from that, I don't see much use in a kernal-replacement. With expansion-memory at IO2/IO3 you could use SoftJiffy and MINIMON also uses that area to hide itself.

The use-case that would make me replace the internal kernal just isn't there.
Overdoc
Vic 20 Amateur
Posts: 41
Joined: Mon Jul 14, 2008 12:00 pm
Location: Austria

Re: modded VIC 20 kernals?

Post by Overdoc »

True, running Minimon in $9800..$9FFF certainly is a nice trick. :)

However, the disadvantage is that it needs an additional cartridge which is blocking the expansion port, so you will also need an expander.

In my case, I already have a kernal/eprom adapter and I can still add 4 more kernals to the 4 I have ready for burning into the eprom. So I would not need any additional hardware if I had a kernal with integrated Minimon :)

Jiffydos already covers many useful additions to the kernal, like the @ command for disk operations, or the function key shortcuts.
But there is a number of additional useful kernal modifications not available in Jiffydos:

- Minimon (or something alike)
- display of the start and end address in hex when loading a file (this is something I never want to miss being used to it for over 35 years from my Dolphin C64)
- various reset functions like bypassing autostart of a cartridge by holding certain keys during reset
- user defined startup text/colours
- SD2IEC enhancements (file browser, speed-loading, etc.)
Overdoc
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: modded VIC 20 kernals?

Post by tokra »

Overdoc wrote: Fri Mar 15, 2024 4:15 am True, running Minimon in $9800..$9FFF certainly is a nice trick. :)

However, the disadvantage is that it needs an additional cartridge which is blocking the expansion port, so you will also need an expander.
No, it does not, the cartridge port is extended on the MINIMON-cartridge: http://sleepingelephant.com/ipw-web/bul ... 29#p115929
- various reset functions like bypassing autostart of a cartridge by holding certain keys during reset
MINIMON does that as well.

I actually use a prototype of MINIMON in conjunction with the MegaCart. The MegaCart has SJLOAD included, so it automatically loads fast from floppy. When I need MINIMON I can just flip the switch on the cartridge and there it is.

All without opening up your VIC-20 and unsoldering the kernal-ROM. I like to compare the MINIMON-cartridge to the "TRON"-program from the movie of the same name :D
RJBowman
Vic 20 Enthusiast
Posts: 198
Joined: Tue Oct 25, 2011 7:50 pm

Re: modded VIC 20 kernals?

Post by RJBowman »

The KERNAL is accessed through a jump table in RAM. You can change those jump points and switch out any KERNAL subroutine you want without having to replace ROMs.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: modded VIC 20 kernals?

Post by Mike »

RJBowman wrote:The KERNAL is accessed through a jump table in RAM. You can change those jump points and switch out any KERNAL subroutine you want without having to replace ROMs.
That is the same case with the C64, but it did not give people a reason not to produce modified KERNAL ROMs.

Edit/Addition: That being said, IMO the main application for modified KERNALs is/was to provide alternate I/O for parallel drive speeders (on the user port), incorporate IEEE support (similar to the VIC-1112 cartridge), perhaps providing parallel printer support. These KERNALs always had to compromise on the tape and RS232 routines in case the original IEC routines were intended to be kept.

On the C64, it is possible to try out a modified KERNAL without a permanent change on the mainboard by just doing a RAM copy and changing CPU port/PLA action to let the CPU access the RAM under the ROM. Alternatively, some involved circuitry in a cartridge can also replace the KERNAL from the outside, while still allowing access to the RAM under the (then external) KERNAL. Both methods cannot be realised on a VIC-20 without internal modifications, the chipset logic does not allow for that. One needs to replace the KERNAL ROM itself, perhaps by unsoldering it first and placing a socket instead. All this puts a strong impediment on any developments in that regard on the VIC-20, and JiffyDOS is about the only notable exception to the rule.
Overdoc wrote:- user defined startup text/colours
IMO, changes to the standard display colours and startup message are not much more than a vanity job. They are only visible for a short time after power up, and any loaded and started program will likely have its own idea about the display colours.
User avatar
bjonte
Vic 20 Hobbyist
Posts: 110
Joined: Sun Jan 22, 2017 5:47 am
Location: Gothenburg

Re: modded VIC 20 kernals?

Post by bjonte »

Merytsetesh wrote: Thu Mar 14, 2024 12:21 pm If I had one mod for the VIC KERNAL, it would be to amend the screen routines to take account of variable dimensions instead of relying on the hardcoded values... :P
Yeah, asking for the screen size returns hard coded values. It would have been nice if that was dynamic, but sadly too late.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: modded VIC 20 kernals?

Post by Mike »

bjonte wrote:[...] asking for the screen size returns hard coded values. It would have been nice if that was dynamic, but sadly too late.
The KERNAL call JSR $FFED (SCREEN) is beyond uselessness. It assumes a level of abstraction (regarding the screen size) that at that time neither was expected nor required from programs using screen output.

With the 264 series, JSR $FFED still returns 40x25 as screen size even if a window had been set. That had been corrected on the C128, but there, for example, TEDMON still does not adapt its M display for a windowed - i.e. reduced - number of columns ... :( ... it only switches between a fixed 8 bytes/line for the 40 column display on VIC-II and 16 bytes/line for the 80 column VDC display.

In any case, the fundamental issue is sorted out for the VIC-20 anyway with tokra's Maxi-/Uber-Edit. Programs are free to use this tool for a certain given, new screen size - and then they have a good idea what that new screen size is and neither do need JSR $FFED to inquire it.
User avatar
Rich
Vic 20 Hobbyist
Posts: 137
Joined: Mon Nov 29, 2021 4:15 pm

Re: modded VIC 20 kernals?

Post by Rich »

So are there any custom kernal roms, I have jiffydos and the original with a switch.
Overdoc
Vic 20 Amateur
Posts: 41
Joined: Mon Jul 14, 2008 12:00 pm
Location: Austria

Re: modded VIC 20 kernals?

Post by Overdoc »

On the C64, it is possible to try out a modified KERNAL without a permanent change on the mainboard by just doing a RAM copy and changing CPU port/PLA action to let the CPU access the RAM under the ROM. Alternatively, some involved circuitry in a cartridge can also replace the KERNAL from the outside, while still allowing access to the RAM under the (then external) KERNAL. Both methods cannot be realised on a VIC-20 without internal modifications, the chipset logic does not allow for that. One needs to replace the KERNAL ROM itself, perhaps by unsoldering it first and placing a socket instead. All this puts a strong impediment on any developments in that regard on the VIC-20, and JiffyDOS is about the only notable exception to the rule.
Correct, floppy-speeder systems were the main reason for modified kernals. But most of them came with additional benefits like the ones I listed.
But soft-loading a kernal in RAM below the original kernal ROM only makes sense for testing. Otherwise, the soft-loaded kernal will be overwirtten by any game or application which uses the RAM below the ROM (the RAM in this location is also overwritten by most unpacker-routines, even if the game/app does not have code in there)

But I think at least some VIC20s have the kernal already socketed from factory?
IMO, changes to the standard display colours and startup message are not much more than a vanity job. They are only visible for a short time after power up, and any loaded and started program will likely have its own idea about the display colours.
Since the startup colour selection is more readable on the VIC20 than it is on the C64 (blue on blue), this is indeed not a big topic on the VIC.
(I always had my Dolphindos with the colour schema from the SX64, which is similar to the VIC20 startup colours)
Overdoc
Post Reply