Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > SD2IEC fastloader
2019-02-19 15:51
oziphantom

Registered: Oct 2014
Posts: 478
SD2IEC fastloader

Does anybody know of a system that fast loads, or a disassembly of a fast loader that SD2IEC supports?
 
... 57 posts hidden. Click here to view all posts....
 
2019-02-25 21:47
cadaver

Registered: Feb 2002
Posts: 1153
Hmm.. ended up making an NMI state machine to get the IEC stock protocol sends (before eload init, or for saving) reliable. The good part is that now that I got it running, can try to make it tidier.

According to the official protocol specs, it should be safe for the talker to spend whatever amount of time in each bit, after the initial ready-for-data handshake is done. However delaying the last bit apparently means JiffyDos activation (according to the SD2IEC firmware source), which isn't wanted in this case :)
2019-02-25 22:28
Krill

Registered: Apr 2002
Posts: 2847
Quoting Krill
I did some research into that for Thundax's yet-to-be-released game which premiered at X 2018. He required an IRQ loader as well as an IRQ saver, both not resident in the drive, so also uploading the code using KERNAL had to be IRQ-friendly. I don't have the code here at the moment, and it needs some clean-up, but i'll post the gist of it soonish.
Quoting cadaver
Hmm.. ended up making an NMI state machine to get the IEC stock protocol sends (before eload init, or for saving) reliable. The good part is that now that I got it running, can try to make it tidier.
Okay, didn't get around cleaning it up yet and not sure if this helps, but this is an example of what i did:
         ; scratch "TEMP"
         lda #FLOPPYMW - scratch
         ldx #<scratch
         ldy #>scratch
         jsr $ffbd; SETNAM
         lda #$6f; secondary address: command/error channel
         sta $b9
         lda #$20; LISTEN
         jsr sendslow
         jsr $f3e6; send secondary address and filename
         lda #$3f; UNLISTEN
         jsr sendslow
         jsr $ee03; clear ATN

         [...]

sendslow ora $ba
         sta $95
         lda $dd00
         and #%11001111
         ora #%00001000
         sta $dd00
-        bit $dd00
         bpl -
         sei
         jmp $ed5a; send byte
The problem with the KERNAL calls is that sending LISTEN, UNLISTEN or TALK can block for a long time after SEI if the drive happens to be busy. The code above works around that by partially re-implementing the LISTEN and UNLISTEN calls. Once those return, the drive will respond quickly enough to regular KERNAL bus access, making for only moderate IRQ stalling. :)

What does the NMI state machine do? :)
2019-02-25 23:01
cadaver

Registered: Feb 2002
Posts: 1153
Cool, thanks!

The NMI code that I wrote basically reimplements the IEC protocol send of a single byte, with or without EOI. ATN has been set by main program beforehand. The timing is not terribly picky, I'm running now from a timer that is about one and half rasterlines.

The eload init is potentially worse than just a fastloader upload, because it's searching for a file from the memory card.
2019-02-26 00:56
Mr.Ammo
Account closed

Registered: Oct 2002
Posts: 228
Quoting oziphantom
[..] To which I take that sd2iec are somewhat ubiquitous these days particularly with the more casual user, 1541uII is for the hardcore user. But I feel that 1541IIu+ hundreds (probably has reach over a 1000 though) sd2iec thousands [...]

I believe your numbers for the 1541U2 and U2+ are off. Gideon mentioned numbers during his ZOO party (October 2017) talk (https://scenesat.com/videoarchive/47?t=74665):
status October 2017
-----------------------
1541Ultimate        750
1541Ultiamte-II   3.400
Ultimate-II +     1.300

The Ultimate 64 (U2+ included) already passed the 1001 units mark some time ago while the U2+ is also still being sold steadily.
2019-02-26 07:55
oziphantom

Registered: Oct 2014
Posts: 478
I was going for magnitude rather than hard numbers. But thank you for the hard numbers, they are higher than I was expecting, from the low batches and long waiting lists I assumed Gideon hadn't even made that many ;) Its puts 1541U comparability at mid thousands, the catch being that most posts I see are
"I just got SD2IEC but I want to run X"
"SD2IEC suxors and can't run it you need 1541UII"
"Oh ok, I will look at those"
"Damn those are expensive"
"Yeah but worth it"

So while 5000 people might have 1541UII, 4100 of them probably have an SD2IEC as well ;)

Does it support REU and booting in 128 mode now while connected, or is it still detached mode for 128?
2019-02-26 08:04
Krill

Registered: Apr 2002
Posts: 2847
It's time for Pi1541 to pick up steam and replace SD2IEC.

Sadly, most people won't build one themselves, and i only see overpriced offers of ready-made funny-looking boxes.
2019-02-26 08:36
oziphantom

Registered: Oct 2014
Posts: 478
I'm waiting for the Rev C board before I dive in. Sadly it doesn't currently support eLoad, but by the time my game comes out it might.
To be fair a lot of SD2IEC are expensive because they have a "nice case", I think it is what the market wants and a key way for people to differentiate their product from the hundred other identical ones.

I also want to see if I can get the Pi to overlay on the RGBI screen.
2019-02-26 09:33
Krill

Registered: Apr 2002
Posts: 2847
SD2IEC complete with 1541-like plastic case goes for about €50 at the time of writing this, Pi1541 hat with 1541-like plastic case for €70, complete package with a RasPi for €150.
2019-02-26 10:57
Oswald

Registered: Apr 2002
Posts: 5018
gideon should make a cost reduced 1541u, he would sell zillions of it.
2019-02-26 11:05
Krill

Registered: Apr 2002
Posts: 2847
I think a fast-enough microprocessor-based solution able to 100% emulate the drive is the better approach compared to FPGA. Cheaper, too. :)

(Not to mention more maintainable/hackable with more people being able to code software rather than hardware logic.)
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Sander/Focus
bugjam
Clown
Krill/Plush
YTM/Elysium
Sillicon/Unreal
St0rmfr0nt/Quantum
Sentinel/Excess/TREX
DJ Gruby/TRiAD
Nordischsound/Hokuto..
Guests online: 133
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.061 sec.