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 > Requests > NTSC 2-bit transfer routines?
2002-04-24 14:58
cadaver

Registered: Feb 2002
Posts: 1160
NTSC 2-bit transfer routines?

Is there anywhere source code of 2-bit transfer routines with NTSC timing, for a fastloader? Most 2-bit fastloaders seem to be PAL only. Of course, I can rip one from a game but this would be a cleaner solution...
2002-04-24 14:59
cadaver

Registered: Feb 2002
Posts: 1160
And yes, Dreamload uses the ATN-line.. That's not what I'm after :)
2002-04-24 16:12
Celtic
Administrator

Registered: Jan 2002
Posts: 807
as i said before in another post, is there use for a coders-forum in this database??
if so, then back me up on this.. if enough people back me up, we will install one!

/celtic
2002-04-24 17:16
cadaver

Registered: Feb 2002
Posts: 1160
Yes, definitely good idea.
2002-04-24 23:23
cadaver

Registered: Feb 2002
Posts: 1160
Answering my own question :) In fact the solution is easy, the difference is just one clock cycle. Though I don't guarantee anything about these routines.. Btw. this routine was reverse-engineered and adapted from the loader in Technocop, though there's likely 100 similar routines :)

Computer side:

fastload_get: lda $dd00
and #$03
sta fg_eor+1
ora #$10
fg_wait: bit $dd00 ;Wait for 1541 to
bmi fg_wait ;set DATA low
sta $dd00 ;Set CLK low
sei
fg_waitbadline: clc
lda $d011
sbc $d012
and #$07
beq fg_waitbadline
lda $dd00
and #$ff-$10
sta $dd00 ;Set CLK high
fg_delay: lda $00 ;NTSC delay. PAL
lda $1000 ;delay should be
lda $1000 ;one cycle less
lda $dd00
lsr
lsr
eor $dd00
lsr
lsr
eor $dd00
lsr
lsr
fg_eor: eor #$00
eor $dd00
cli
rts

Diskdrive side:

sendbyte: sty temp
tax
lsr
lsr
lsr
lsr
tay
lda sendtbl,y
pha
txa
and #$0f
tay
ldx #$02 ;Set DATA=low
stx $1800
ldx #$00
lda #$04
swait1: bit $1800 ;Wait for CLK=low
beq swait1
stx $1800 ;Set DATA=high
lda sendtbl,y
swait2: ldx $1800 ;Wait for CLK=high
bne swait2
sta $1800
asl
and #$0f
sta $1800
pla
sta $1800
asl
and #$0f
sta $1800
nop ;Not sure if absolutely
ldy temp ;essential
lda #$00
sta $1800
rts

sendtbl: dc.b $0f,$07,$0d,$05
dc.b $0b,$03,$09,$01
dc.b $0e,$06,$0c,$04
dc.b $0a,$02,$08,$00
2002-04-25 00:32
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Quote: as i said before in another post, is there use for a coders-forum in this database??
if so, then back me up on this.. if enough people back me up, we will install one!

/celtic


[Waves hand in the air] i'd like to see a coders forum.
2002-04-25 11:51
Pixman
Account closed

Registered: Dec 2001
Posts: 42
Oh yes, give it to us :)
Coder forums are great, but what about a music forum?
Some (of the rare) newcomers seem to have still problems about music and others have problems configuring & using their editor.
Well, just a proposition.

Greets,
Pixman
2002-04-25 12:27
Steppe

Registered: Jan 2002
Posts: 1510
Great idea!

For me (and others probably too) this could be a valuable resource. I'm especially thinking of tips on how to get instruments to sound the way you want. I still can't figure out how some composers created the sounds and which techiques they used.
2002-04-25 20:31
cadaver

Registered: Feb 2002
Posts: 1160
Heh, in fact it was good I didn't get any actual answers in between of me actually figuring them out myself :) Of course, 2-bit fastloading is about 17 years old but still it feels proud to do something yourself..

The results are now published in Rant #9:
http://www.student.oulu.fi/~loorni/covert/rants/2bitload.htm

(and thanks to MuOn for verifying the operation on a NTSC C64)
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
zscs
MCM/ONSLAUGHT
rexbeng
Jetboy/Elysium
kbs/Pht/Lxt
grass/LETHARGY
rtiainen
Case/Padua
Guests online: 131
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 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (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 Censor Design  (9.3)
5 Triad  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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