| |
6R6
Registered: Feb 2002 Posts: 245 |
Drive Code C128D N0SD0S Scanner bug.
Recently Nostalgia released Legacy of the Ancients.
Legacy of the Ancients +8DIR
The program used to scan the IFFL file refuse to
work on a C128D. I got this error report from someone
in USA, so I did a test on my own C128D.
What happens is:
Installer searches for the iffl file,
then it locates track+sector of the iffl file.
At this point this text is displayed on screen.
N0SD0S V1.2
SCANNING
73, CBM DOS V3.0 1571,00,00
Then scanner get installed in the 1571 drive. Scanner now
searches the IFFL file and you can hear the drive is working
as it makes a click for each track it moves to.
But then at the end of scanning everything freezes,
drive is spinning forever and the led is on.
I tried the same game disk on my c64+1541 and it
works fine. I tried not messing with the $1c07 timer.
I tried with and without fastload cartridge on my c128D.
But I get the same bug each time. Some have said i Have a bad VIC chip, but the VSP scroller in the n0s intro works fine for me.
I am not sure if its the C128D or the disk drive that is causing the problem. I wonder if anyone of you can help
me by verifying if it works or not on these setups:
1) C128D.
2) C128D but run the game from a external 1541(II) drive.
3) C128 + 1571
4) C128 + 1541(II)
5) C64 + 1571
Please post your report here.
Also, if you have any other suggestions to what
the problem might be please post here.
Thanks!
|
|
| |
Mace
Registered: May 2002 Posts: 1799 |
C128 + 1571 : game loads
C128 + 1541-II: game loads
C128 + 1541 : game loads
C64 + 1571 : game loads (even using Final Cart. 3)
[edit]
I thought my C128D was broken, but the C64 mode still works, so:
C128D + internal: game loads (!!)
C128D + 1541-II : crash *)
*) with internal 1571 on, loading from external 1541-II, the light of the internal drive remains on and the game crashes with EOA logo. The DOS versions on the screen is 1571, while I load from 1541-II. Mind you, there's a device-# conflict... |
| |
WVL
Registered: Mar 2002 Posts: 902 |
I'll try this when I get home again. Sounds like the same problem that other loaders also seem to have :( |
| |
6R6
Registered: Feb 2002 Posts: 245 |
@mace:
Thanks for testing, so you're saying your c128d + internal 1571 works ?? i'm clueless.. :+\
|
| |
Mace
Registered: May 2002 Posts: 1799 |
@GRG: yeah, it loads perfectly. I hear music and stuff :)
Have you tested between the two models of C128-D: plastic case & metal case?
I've got a plastic case...
[edit]
Oh, btw, because I forgot to press C= key one time, I found out the C128D also works in C128 mode... it was broken before (black screen)! So thank YOU for that :-)
It doesn't work with tape, though... |
| |
6R6
Registered: Feb 2002 Posts: 245 |
My C128D is a plastic case. Joyport #2 doesnt work though..
Could be its broken after all..
Hope someone else with a C128D can give it a try. :)
For a third opinion you know..
GRG |
| |
WVL
Registered: Mar 2002 Posts: 902 |
I can give it a try on saturday :) first day I will be home again ;) |
| |
Steppe
Registered: Jan 2002 Posts: 1510 |
Hey Glenn,
works fine here on my C128D-CR (metal case) and C128D (plastic case) with the internal drives. If I can be of more help, drop me a line.
/Steppe |
| |
Trurl
Registered: Mar 2002 Posts: 61 |
I tested it on my C128D (Scandinavian, plastic case) and it played fine with the internal 1571, both with and without AR6.
I also tried using 1541-II as #9 but it didn't work, I once got it to the EOA logo but usually it jammed saying 'scanning'. This drive sometimes acts a bit funny so it may be due to that.
With a breadbox C64 + 1541-II it worked ok.
|
| |
QuasaR
Registered: Dec 2001 Posts: 145 |
I had some problems with loader and my C128D (metal case) sometime before, especially when I was playing around with dreamload, which seems to be quite similar to Nosdos, I think. With one of the latest updates of dreamload, even my C128D seems to work... ATM I can't test the game since I was moving houses, but maybe in a few weeks... ;) |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
Ok, so there must be something weird with some 128D's and DCR's because it worked perfectly on mine as well.
Very strange!
|
| |
6R6
Registered: Feb 2002 Posts: 245 |
Thanks for testing i will message you if
I need you to test something (@steppe).
I will just like to point out that my c128d works with
other games, but is having a problem with this one.
The code that is running in the disk drive looks
like this (We're running the same code for 1541
as for 1571) - I am not posting the complete
code.
Scanner is started from "scann_begin", cli
should be set at that point.
;----------- 15xx drive scanner:
sc_fileoffs = $0c ;IFFL File offset
sc_sectCnt = $0d ;IFFL Sector counter
sc_trkCnt = $0e ;IFFL Track counter
sc_trksector = $43 ;Number of sectors per track.
;FDC updates this when entering a new track.
sector_scan = $96
cmptable = $0320
sector_table = $0360
track_table = $0380
* = $0500
ldy #$1f ;clear buffer
lda #0
wed sta cmptable,y
dey
bpl wed
lda #3
sta $31 ;active buffer $0300
s41loop
jsr $f556 ;Sync
sty $30 ;Y = 0, buffer = $0300
jsr get5 ;read 5 bytes
sty $30 ;Y = 5, buffer = $0305
lda $0300
cmp #$52 ;Header block id = $52
bne s41loop ;try again
jsr $f556 ;Sync
jsr get5 ;Y = 0 read 5 bytes to $0305
ldy #0 ;buffer = $0300
sty $30
jsr $f7e8 ;convert gcr
ldx $54
stx $96
lda cmptable,x ;0 = this sector not in table
bne s41loop
dec cmptable,x ;set sector in table
ldy #5 ;gcr pointer
jsr $f7e8 ;convert gcr
ldx $96
lda $53
sta track_table,x ;store track
lda $54
sta sector_table, ;store sector
dec $43 ;Decrease # sectors for track
bne s41loop ;Complete track scanned?
...
code for checking and writing tables here..
...
lda xx
sta $0a
jmp $f418 ;Exit
get5 bvc get5 ;read 5 bytes
clv
lda $1c01
sta ($30),y
iny
cpy #5
bne get5
rts
scann_begin:
lda $024f ;allocate buffer
ora #6
sta $024f
lda #0
sta $0c
sta $0d
sta $0e
lda #$28 ;Timer hi
sta $1c07
lda $19 ;$19+$18 has T+S for file
sta $0b ;Sector
lda $18
sta $0a ;Track
more: lda #$e0 ;Exectute code at $0500->
sta $02
lda $02
bmi *-2
lda $0a
bne more
jmp $c194 ;Exit scanner
;------------- endof 15xx scanner
Now, while the drive side is scanning the iffi file
the C64/C128D side runs this code:
This routine is a waitloop, and it will
not exit until drive code has jumped $c194
lda #0
sta $90
lda Device ;zp lda $ba
jsr Rom_IECTalk
lda #$6F
jsr Rom_IECTalkSecAdr
Loop jsr Rom_IECAcPtr
bit $90
bvc Loop
jsr Rom_IECUnTalk
...
When my C128D bugs the PC is stuck inside that "Loop".
I think one thing is for sure, drive locks itself up.
GRG
|
| |
Ninja
Registered: Jan 2002 Posts: 411 |
GRG: Do you use ROM for moving the head? If not, have you tried raising the delay value for the movement?
|
| |
TNT Account closed
Registered: Oct 2004 Posts: 189 |
ninja: he seems to be using job code $e0. |
| |
6R6
Registered: Feb 2002 Posts: 245 |
Hello again,
Yes I'm using jobcode $e0 to move head.
Can you dump your C128D drive roms for me ?
You can use this tool I made:
Drive Memory Dump v1.0
This tool will print dos version number from
the error channel.
Please use that as filename.
Example filename:
"1541 dos v2.6"
Thanks and
Cheers!
Glenn
|
| |
Mace
Registered: May 2002 Posts: 1799 |
Okikdoki. |
| |
6R6
Registered: Feb 2002 Posts: 245 |
( My C128D 1571 drive freaking out on Lota )
I did some more checking, and I found out that
the scanner freaks out somewhere between track 32-33.
If I exit the scanner when reaching track 32 the game
will load and run as it should.
Scanner checks the tracks in this order:
17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1
18,19,20,21,22,23,24,25,26,27,28,29,30,31,32, * freak out *
The lota game has game data in track 18.
(Not in bam t+s 18,00 and dir entry 18,01.)
lda $0a
cmp #32
bne more
jmp $c194 ;Exit scanner
badly aligned drive ? hmm..
Thanks to the ones who has sent me drive roms.
Currently I have:
3 * 1541(-II) roms (all different)
CBM 1541 64'er (73,64'er dos v3 1541,00,00)
CBM 1541 Digidos (73,digi-dos 1.0 1541,00,00)
CBM 1541 Dolphindos 2 (73,dolphindos.2 1541,00,00)
CBM 1541 Jiffydos 5 (73,jiffydos 5.0 1541,00,00)
CBM 1541 Speeddos ++ (73,speeddos ++ 1541,00,00)
CBM 1541 Speeddos 2.7 (73,speeddos 2.7 1541,00,00)
CBM 1541 Prologic System (73,Prologic Classic,00,00)
CBM 1541 Turbo Process System (73,turbo-access r2.8,00,00)
Oceanic 118 (73,cbm dos v2.6 1541,00,00)
Oceanic 118 (73,r-dos 40 tr. 1541,00,00)
3 * C128D 1571 roms (all different)
CBM 1571 (C128DCR) (73,cbm dos v3.1 1571,00,00)
CBM 1571 Jiffydos (C128D) (73,jiffydos 6.0 1571,00,00)
CBM 1581 (73,copyright cbm dos v10 1581,00,00)
CMD FD-2000 (73,cmd fd dos 1.40,00,00)
CMD FD-4000 (73,cmd fd dos 1.40,00,00)
And two versions of CMD HD v1.86 and v1.90, i havent had the time to check them.
These modified 1541 roms wont work with the current
n0sd0s identifier:
CBM 1541 Prologic System (73,Prologic Classic,00,00)
CBM 1541 Turbo Process System (73,turbo-access r2.8,00,00)
Mail me your roms if you have anything else.
Anyone have a CMD HD for sale ?
GRG |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
You're not running the thing in 2 MHz, are you?
Because in the 2 MHz mode, you must not use clv:bvc * for the byte sync but instead, poll $180f. The clv:bvc * method freezes once in a while.
But then, 2 MHz are really unnecessary for a scanner. However, they're not for loading. |
| |
6R6
Registered: Feb 2002 Posts: 245 |
@krill: My code doesnt use the register for 2mhz mode. But thanks for the info. |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
I'm leaning towards bad drive alignment, where it gets bad data at track 32 and up. Have you tried modifying the scanner to send over sector checksums one sector at a time?
|
| |
6R6
Registered: Feb 2002 Posts: 245 |
A friend of mine tested on 2 different C128D's some time ago, he had no troubles...
He also said that running the game on a c128d from an external 1541,1571 and oceanic (device #9) didnt work.
Didnt even show the dos error message (73,cmd dos v2.6 1541,00,00).
A c128d is just troubles.. RR-net doesnt work on it either...
@magervalp:
I will have to try that now. |
| |
6R6
Registered: Feb 2002 Posts: 245 |
Quote: C128 + 1571 : game loads
C128 + 1541-II: game loads
C128 + 1541 : game loads
C64 + 1571 : game loads (even using Final Cart. 3)
[edit]
I thought my C128D was broken, but the C64 mode still works, so:
C128D + internal: game loads (!!)
C128D + 1541-II : crash *)
*) with internal 1571 on, loading from external 1541-II, the light of the internal drive remains on and the game crashes with EOA logo. The DOS versions on the screen is 1571, while I load from 1541-II. Mind you, there's a device-# conflict...
@Mace:
Can you test LOTA with a normal C128 + various drives as device #9 and see if it hangs ?
@others:
Other games with N0sd0s has similar
problems running from device #9 on the C128D.
Tests has give these results:
C128D + 1541-II (device #9) : hangs on scanning
C128D + Oceanice (device #9) : hangs on scanning
C128D + 1581 (device #9) : works
Loading game from C128D disk drive, then switching device number to 9 ( 1541-II ) gets past scanning, then the EOA logo appears and game hangs.
In general there is a problem with using C128D and 1541-II drives on Device #9.
More to follow..
|
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Yes, C128D is a pain in the ass. I fixed and re-fixed my loader several times for it. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
krill, your earlier versions all worked fine on my 128dcr. |
| |
Mace
Registered: May 2002 Posts: 1799 |
Quote:@Mace:
Can you test LOTA with a normal C128 + various drives as device #9 and see if it hangs ?
Okidoki, will do so tonight. |
| |
Trurl
Registered: Mar 2002 Posts: 61 |
I dug out my flat C128 and tested LOTA with 1541-II. It worked as drive #8 but as #9, #10 and #11 it got to the EOA screen and jammed there.
EDIT: I just tested it with my breadbox+1541-II and it jams just the same as #9.
|
| |
6R6
Registered: Feb 2002 Posts: 245 |
Hello again.
I have dug my nose into this, and done some checking on the N0sD0s 1.2 bug where we have a 1541-II/1571 drive as device #9 on the serial bus.
The first bug that happens is that the installer
stops at the n0sd0s splash screen where "scanning" is displayed.
This has been partially solved.
The second bug that happens is more interesting:
To explain the bug I have done 5 tests to show
what happens. As for equipment setup I
use a C64 with RR + RRnet, a 1541 as device #8 and
a 1541-II as device #9. (Daisy chain connection)
Test 1: C64 - 1541 (#8) - 1541-II (#9)
--------------------------------------
If I run a N0sd0s game from #9 I only get crap data when loading, sometimes i get bytes that are correct. (Mostly $aa,$a0,$a3.)
Test 2: C64 - 1541 (turned off) - 1541-II (#9)
----------------------------------------------
If I run N0sd0s game from #9 I only get crap data when loading, sometimes i get bytes that are correct. (Mostly $aa,$a0,$a3.)
Test 3: C64 - 1541 (turned off) - 1541-II (#8)
----------------------------------------------
If I run a N0sd0s game from the 1541-II drive, with dip switches set to device #8, it works fine.
Test 4: C64 - 1541-II (#9)
---------------------------
In this test i removed the 1541 drive, and connected the
C64 directly to the 1541-II as device #9.
And it doesnt work, i get a lot of crap data.
But if I turn the dip switches to device #8 it works fine
again.
Test 5: C64 - 1541 (#8) - 1581 (#9) - CMD FD 4000 (#10)
-------------------------------------------------------
In this test I have all devices turned on.
The game works fine from any of the devices.
I don't understand why this happens.
What happens in the 1541-II drive when I flip the dip switches to device position #9 ?
(I also tried setting the 1541-II to #10 and #11 and it gave the same error.)
Does the dip switching corrupt the $1800 registers when I use $dd02.
Because I am using $dd02 in the code.
The C64 side of the handshake uses $dd02 to toggle the bits in $dd00 when sending
bytes to the disk drive. The get byte routine doesnt use $dd02 registers.
I'm suspecting it has to do with $dd02.
Our old n0sd0s 1.0 works fine:
Conan +3D
Check that game from any device number.
C64 code here only uses $dd00.
Maybe Doc Bacardi, Ninja, Krill, Graham, Lasse, HCL, or some other skilled
drive coder can give me a explanation for this behaviour ?
Thanks :)
|
| |
TNT Account closed
Registered: Oct 2004 Posts: 189 |
Device number setting changes bits 5 & 6 at $1800. If the loader assumes they are both zero (as thay are with device #8) then it will fail with other device numbers. |
| |
6R6
Registered: Feb 2002 Posts: 245 |
Oh shit! I have forgotten to check that.
|
| |
6R6
Registered: Feb 2002 Posts: 245 |
Ah, excellent. Now it works from device #9 again.
Thanks TNT! :)
I didnt think about the device number was hard wired to the $1800 register. |
| |
TNT Account closed
Registered: Oct 2004 Posts: 189 |
An additional note: if you need to do some runtime modifications to the drive transfer code depending on device number, it's better to do it in drive using the value from $1800 instead of drive number. That way the loader will work even if drive number was changed with "m-w". |
| |
6R6
Registered: Feb 2002 Posts: 245 |
All bugs found and fixed. Thanks to all for help. :)
|