| |
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...
|
|
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
And yes, Dreamload uses the ATN-line.. That's not what I'm after :) |
| |
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 |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
Yes, definitely good idea. |
| |
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 |
| |
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. |
| |
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 |
| |
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. |
| |
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) |