| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
2 bit irq loader
Hmm, just a question...
Is there a 2 bit irq loader, which doesn't require blocking other interrupts while loading a byte?
i.o.w. Is there a realy fast irq loader which doesn't block any interrupts and let me use my beloved sprites? :-)
|
|
... 42 posts hidden. Click here to view all posts.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
nice:) |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Can you still use the 2Mhz-mode on faster drives then? When we tried a similar idea back then, we couldn't figure how to make a fast enough loop-routine for the good old 1541 :( |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Oh, haven't tried that yet, but i can always clock down the drive-side sending routines to 1 mhz which should not matter much since the c64 is clocked at 1 mhz anyways. |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Our experiments showed that it does help significantly if the drive runs at 2Mhz and can f.e. react faster to the handshaking. For the benefit of that, we let down the multiple-drive-thingie. Well, after all, it's a choice of design :) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Yes it is. But since the 1541 is the least common denominator, all other drive types don't really have to be faster, at least for demos. And i'd always prefer more compatibility over more speed. :) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
And if in doubt, you can still make it optional. :) |
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
Quote: Why don't you just check it yourself? Doesn't take long to code, really. :)
Ok, well I've coded something myself but it doesn't clear-up things. :-D
check out the code snipplets:
drive-code ;set lines to low
lda $1800
and #%11110000
sta $1800
;wait for both lines high
lda #%00000101
and $1800
cmp #%00000101
bne *-7
c64 code ;wait for both lines low
lda #%11000000
bit $dd00
bne *-3
;set both lines high
lda $dd00
and #%00001111
ora #%00110000
sta $dd00
The drive-code should set both lines (clock+data) to low and then wait for lines to go high.
The C64 code should wait for the lines to go low, and then set the lines high.
In both the drive and the c64 the interrupts are disabled by the sei command.
Now what happens is... nothing :-D
The drive sets the lines to low and waits until the lines go high again.
The C64 keeps waiting for the lines to go low.
And when I look at VIA1 ($1800) in the drive, I see that the drive actually set the lines to low, but the CIA2 register ($dd00) in the C64 still shows the lines as high. :-S
Any of you drive gurus got any idea on what I'm doing wrong?
|
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
K, I've got a message from Dahl, telling me that the bits get inverted. So I checked a little, and found the following table...
|DC|DC|DC|DC|
-----+--+--+--+--+
$1800|11|01|10|00|
-----+--+--+--+--+
$dd00|00|01|10|00|
-----+--+--+--+--+
In other words, only when setting both lines to low or high, they get inverted. But when one sets only 1 line high or low, the lines won't get inverted.
Is this correct? |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
Quote: K, I've got a message from Dahl, telling me that the bits get inverted. So I checked a little, and found the following table...
|DC|DC|DC|DC|
-----+--+--+--+--+
$1800|11|01|10|00|
-----+--+--+--+--+
$dd00|00|01|10|00|
-----+--+--+--+--+
In other words, only when setting both lines to low or high, they get inverted. But when one sets only 1 line high or low, the lines won't get inverted.
Is this correct?
No. They are always inverted. Have you setup $dd02 correctly?
Also, you can use BIT $1800 when waiting, for less jitter.
|
| |
MRT Account closed
Registered: Sep 2005 Posts: 149 |
Hmm, didn't set the data direction registers coz I thought the default setting should be good. The both out-lines are enabled on both sides by default. But, I forgot to check if they were still correct when I made the table above... :-S
I'll check it again. :-)
bout that bit $1800...
You cannot use it when you want to check if both lines are high, can you? Then you check if at least one of the two lines (or both) is high.
|
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |