Reading track 18 via GET# locks up emu (G41 mode)

General problems and how-to's of running/using the CCS64 emulator.

Moderator: Håkan Sundell

Post Reply
tlg
Posts: 2
Joined: Fri Jun 12, 2009 6:34 pm

Reading track 18 via GET# locks up emu (G41 mode)

Post by tlg »

An old BBS program I am restoring uses relative files, and also opens and reads raw directory data (to display directory contents), so I chose to use the G41 disk image (created and used exclusively in normal mode). Updating of the disk is set to continuous.

I get two specific errors, but the first is the most troublesome so I'm posting that one now.

The raw directory read routine of the BBS is straight out of Raeto Colin West's book Programming the Commodore 64. This routine works fine on a real 1541 disk, and I am stymied as to why it won't in CCS64.

1190 open15,8,15,"i0"
1200 open1,8,0,"$0":gosub (error read routine - input15,e,e$,e1,e2:return)
1210 get#1,a$,a$
1220 get#1,a$,a$,a$,e$:if st then 1300
1230 g$=str$(asc(a$+chr$(0))+asc(e$+chr$(0))*256)
1240 get#1,a$:ifa$<>""theng$=g$+a$:goto1240
1290 print g$:goto1220
1300 close1:close15

The following always occurs with the disk that has 10+ files on it.

The routine works fine reading and printing the disk name/header and ID, and file entries up until the 6th directory entry/program file are printed. Once the 6th file on this disk is printed, the emulator becomes unresponsive and requires a hard reset (The same disk image is available after the reset). It never prints a 7th program file entry :(

If you have any ideas as to why it does this, I'd love to know.

Thanks.

Edit: Here's the bit from the book...
Image
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Reading track 18 via GET# locks up emu (G41 mode)

Post by Stuart Toomer »

I have passed this on to Hakan for investigation...
Kind regards,

Stuart Toomer.
Stuart Toomer
Site Co-Admin
Posts: 786
Joined: Wed Aug 20, 2003 2:46 pm
Location: East Yorkshire, England

Re: Reading track 18 via GET# locks up emu (G41 mode)

Post by Stuart Toomer »

Hi. Hakan cannot reproduce this bug. He made a fresh G41 file in CCS63 V3.7 and typed-in the code sample and it works fine. I have e-mailed you his G41 file.
Kind regards,

Stuart Toomer.
Post Reply