| |
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.... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
No, i have already implemented a watchdog routine (using a timer irq) in the drive code, so any loop waiting for the c64 will be terminated and the drive reset if it just takes too long.
And it might be overkill for a demo, but i will make this loader more and more a loader suitable for games, as well. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Oh, and i also got rid of this stupid 2 first chars filename matching, now you can load files using their full names (1-16 chars) while still using the dir buffer, so it does still not need to be read and parsed on every load. A 16-bit hash value matching does the trick here. :) |
| |
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? |
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next |