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: 490
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: 1160
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: 2980
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: 1160
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: 490
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: 2980
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: 490
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: 2980
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: 5094
gideon should make a cost reduced 1541u, he would sell zillions of it.
2019-02-26 11:05
Krill

Registered: Apr 2002
Posts: 2980
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
Flashback
K-reator/CMS/F4CG
REBEL 1/HF
Guests online: 94
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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