zippy - yet another serial fastloader

Basic and Machine Language

Moderator: Moderators

User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

zippy - yet another serial fastloader

Post by srowe »

I've long been fascinated that JiffyDOS implemented an improved protocol to speed up transfers between the VIC and disk drives. Searching the 'net for information was frustrating, there's very little detail.

From what I could find, and from looking at the source for SJ20, I've written the controller code for the VIC-20 from scratch. I'm pleased I've managed to make something small (less than 800 bytes for the simplest usecase) and fast (more than 15x faster to an SD2IEC).

While I've extensively tested it (including an 18 hour save/load torture test) please consider this still experimental. Feedback, comments, bugs are welcome.

Source, as usual, is also available here

https://eden.mose.org.uk/gitweb/?p=zippy.git;a=summary
Attachments
zippy.zip
(62.86 KiB) Downloaded 185 times
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: zippy - yet another serial fastloader

Post by orion70 »

Wow! Too bad I'm on a vacation now, will try once back home. It'll come particularly useful for long loading times of games for the expanded machine :D
User avatar
ops
Vic 20 Dabbler
Posts: 88
Joined: Mon Feb 19, 2018 11:25 am
Location: Finland

Re: zippy - yet another serial fastloader

Post by ops »

Great work! I'll take a better look after summer vacation.
User avatar
AndyH
Vic 20 Afficionado
Posts: 364
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: zippy - yet another serial fastloader

Post by AndyH »

Nice one!
--
AndyH
HEWCO | Vic 20 blog
DarwinNE
Vic 20 Devotee
Posts: 231
Joined: Tue Sep 04, 2018 2:40 am
Website: http://davbucci.chez-alice.fr
Location: Grenoble - France

Re: zippy - yet another serial fastloader

Post by DarwinNE »

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

Re: zippy - yet another serial fastloader

Post by nbla000 »

Very good work, I will test it.
Mega-Cart: the cartridge you plug in once and for all.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Re: zippy - yet another serial fastloader

Post by nbla000 »

srowe wrote: Sun Jul 17, 2022 12:56 am Source, as usual, is also available here

https://eden.mose.org.uk/gitweb/?p=zippy.git;a=summary
I'm playing a bit with it by compiling from Windows 10 (not makefile), it seems that I'm not able to use these options:

Code: Select all

OPT_PRINT_ADDR
OPT_BANNER

Code: Select all

dasm zippy.asm -DOPT_SAVE -DOPT_API -DOPT_CART_SA -DOPT_PRINT_ADDR -DOPT_BANNER -DSYS_PAL -ozippy-pal-full.prg

--- Unresolved Symbol List
print_cr                 0000 ????         (R )
chrout                   0000 ????         (R )
print_to_addr            0000 ????         (R )
print_from_addr          0000 ????         (R )
--- 4 Unresolved Symbols
While this command works:

Code: Select all

dasm zippy.asm -DOPT_SAVE -DOPT_API -DOPT_CART_SA -DSYS_PAL -ozippy-pal-full.prg
maybe something is missing on kernal-defs.asm and/or other files.

In addition, it could be useful to add another option like START_ADR to compile for a custom start address instead of $400:

It requires just a small update on zippy.asm:

Code: Select all

	ifconst START_ADR

	org	START_ADR

	else

	org	$400

	endif
Mega-Cart: the cartridge you plug in once and for all.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: zippy - yet another serial fastloader

Post by srowe »

nbla000 wrote: Fri Aug 05, 2022 9:13 am
I'm playing a bit with it by compiling from Windows 10 (not makefile), it seems that I'm not able to use these options:

Code: Select all

OPT_PRINT_ADDR
OPT_BANNER

Code: Select all

dasm zippy.asm -DOPT_SAVE -DOPT_API -DOPT_CART_SA -DOPT_PRINT_ADDR -DOPT_BANNER -DSYS_PAL -ozippy-pal-full.prg

--- Unresolved Symbol List
print_cr                 0000 ????         (R )
chrout                   0000 ????         (R )
print_to_addr            0000 ????         (R )
print_from_addr          0000 ????         (R )
--- 4 Unresolved Symbols
I should have been clearer in the instructions, if you enable these options you have to supply the print_ functions yourself. chrout could probably be included in the KERNAL symbols.
In addition, it could be useful to add another option like START_ADR to compile for a custom start address instead of $400:
That's a good idea, I'll add that shortly. The top-level file is intended only as a example, I include the main source files when I'm using it IRL.

[Edit: I've pushed a v1.2 with these changes]
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Re: zippy - yet another serial fastloader

Post by nbla000 »

thanks for your explaination, I'm planning to test it in both PAL and NTSC machines, I wish to compare it with SJLOAD and test compatibility with pi1541 (both 1541 and 1581 emulation in JiffyDOS mode)
I will report you results.
Mega-Cart: the cartridge you plug in once and for all.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: zippy - yet another serial fastloader

Post by srowe »

I look forward to seeing how your tests work out. My pi is too old so I don't have a pi1541.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Re: zippy - yet another serial fastloader

Post by nbla000 »

srowe wrote: Sat Aug 06, 2022 2:29 am I look forward to seeing how your tests work out. My pi is too old so I don't have a pi1541.
I've successfully tested the NTSC version with pi1541 (both 1541 and 1581 emulation), I've also compared speed with SJLOAD and JIFFYDOS and they are quite similar, while by using an SD2IEC device, Zippy it's slighty faster but quite similar to SJLOAD, by using a 95 BLK file it requires about 4 seconds with both Zippy and SJLOAD and 5 seconds by using JiffyDOS.

Anyway It is a bit smaller that the minimal SJLOAD version and could be useful in some situations, very good work!

PS: I have no PAL machines at the moment (they are on recapping phase) but if you need, I will test Zippy+pi1541 on PAL machines when possible.
Mega-Cart: the cartridge you plug in once and for all.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: zippy - yet another serial fastloader

Post by srowe »

nbla000 wrote: Mon Aug 08, 2022 4:26 am I've successfully tested the NTSC version with pi1541 (both 1541 and 1581 emulation), I've also compared speed with SJLOAD and JIFFYDOS and they are quite similar, while by using an SD2IEC device, Zippy it's slighty faster but quite similar to SJLOAD, by using a 95 BLK file it requires about 4 seconds with both Zippy and SJLOAD and 5 seconds by using JiffyDOS.

Anyway It is a bit smaller that the minimal SJLOAD version and could be useful in some situations, very good work!
Thanks for confirming this, I only did limited testing of the NTSC version with VICE (and, obviously, that didn't test an SD2IEC). The size reduction was a combination of general optimizations and making the load routine use a common function for byte and sector modes. That required some ugly stack manipulation, I might go back and see if I can find a neater solution.
PS: I have no PAL machines at the moment (they are on recapping phase) but if you need, I will test Zippy+pi1541 on PAL machines when possible.
Most of my testing was of the PAL version with a mixture of VICE and my FE3. When you are able a check of pi1541 and PAL would be nice,

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

Re: zippy - yet another serial fastloader

Post by nbla000 »

srowe wrote: Mon Aug 08, 2022 10:46 am
PS: I have no PAL machines at the moment (they are on recapping phase) but if you need, I will test Zippy+pi1541 on PAL machines when possible.
Most of my testing was of the PAL version with a mixture of VICE and my FE3. When you are able a check of pi1541 and PAL would be nice,
I forgot to mention that I've tested it also with a generic 32k expansion by compiling for $B000 address and with Mega-Cart by compiling for IO2 address by overwriting Mega-Cart music data just for tests, It's a pleasure to play DOOM with SJLOAD/Zippy, I forgot FE3 but I will test it too with my NTSC machine.

For PAL machines you have to wait a bit since now in Italy there is an holiday period and the repair man who is recapping my VICs is closed for a while.
Mega-Cart: the cartridge you plug in once and for all.
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: zippy - yet another serial fastloader

Post by JonBrawn »

I'm having a bit of difficulty with this - I assume that the usage is:

Code: Select all

LOAD"ZIPPY-NTSC.PRG",8,1
SYS1024
However, I'm not seeing any difference in load times. What am I missing?
Working on FPGA replacement for 6560/6561
https://youtube.com/@vicenary
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: zippy - yet another serial fastloader

Post by srowe »

JonBrawn wrote: Sun Jun 18, 2023 12:29 pm However, I'm not seeing any difference in load times. What am I missing?
What device are you loading from?
Post Reply