Login
Back to forumReply to this topicGo to last reply

Posted By

craftsman
on 2014-11-13
23:53:55
 1541-II drive memory test

0 f=768:l=2047:a=40960:open1,8,15:fori=ftol:c=peek(a+i):h%=i/256:l%=i-h%*256
1 print#1,"m-w";chr$(l%);chr$(h%);chr$(1);chr$(c):print".";:nexti:fori=ftol
2 c=peek(a+i):h%=i/256:l%=i-h%*256:print#1,"m-r";chr$(l%);chr$(h%);chr$(1)
3 get#1,a$:iflen(a$)=0thena$=chr$(0):ifasc(a$)<>cthenprint"x";:nexti
4 print"+";:nexti

The above Commodore 64 program was copied from a tread on Lemon64. It reads a chunk of the 64's memory and writes it to the drives memory. It then reads the drives memory and checks to see if it matches. I would like to be able to use a similar program on the c16 to test the drives memory on my 1541-II that is hooked up to my c16.

This program runs fine on the 64 but fails with device not found errors after reading several bites on the c16.

Anyone able to fix this?

Posted By

Csabo
on 2014-11-14
09:42:40
 Re: 1541-II drive memory test

Runs fine in YAPE.

It checks the memory from $A000 (BASIC variable A). I'm not sure how you got the data you want to write to the drive to $A000, and additionally, on the C16, $A000 "doesn't exist" (which is to say, it's mapped to $A000-$8000 = $2000). So, for one, simply using $2000 (8192 decimal) for variable A should be easier.

Otherwise, like I said, it works on YAPE, and I don't see anything in it that would cause to fail. This should work just fine. Is the drive connected okay?

Posted By

JamesC
on 2014-11-14
11:28:06
 Re: 1541-II drive memory test

Works in YAPE with 1541 or 1551 CPU emulation. It does NOT run with 1581 emulation.

Posted By

craftsman
on 2014-11-14
11:18:51
 Re: 1541-II drive memory test

I'll give the $a000 a try tonight. I had figured that it would be Ram it was copying from but guessed it would still work and be able to verify that the data stored correctly. On the 64 it copies one of the built in ROMS.

It really strange to me that it fails with a device not found error in line 1 after writing 198 bites. The drive loads and runs programs fine. I'll check the cables tonight and test with another 41-II hooked up to it tonight.

Posted By

JamesC
on 2014-11-15
08:57:07
 Re: 1541-II drive memory test

@craftsman, I wrote a not-so-little program that doesn't copy ROM, but instead stuffs the drive buffers with 0's and 255's. This way we don't have to worry about whether you're reading RAM or ROM. :)

Note that this program has been revised. Scroll down for the newer version. ;)


Posted By

craftsman
on 2014-11-14
13:34:38
 Re: 1541-II drive memory test

Nice, I'll give it a try after work and let you know.

Posted By

JamesC
on 2014-11-14
18:01:43
 Re: 1541-II drive memory test

Okay, so the 1541 isn't keeping up after all.

After a few edits of the code above, I was able to get the 1541 and 1581 to get all the way through the test. To accomplish this, I had to blank screen, much like how the 16 blanks the screen when accessing the tape drive.

Working version of Craftsman's program: (in the first post)
0 TED=PEEK(65286):POKE65286,11
1 F=768:L=2047:A=40960:OPEN1,8,15:FORI=FTOL:C=PEEK(A+I):H%=I/256:L%=I-H%*256
2 PRINT#1,"M-W";CHR$(L%);CHR$(H%);CHR$(1);CHR$(C):PRINT".";:NEXTI:FORI=FTOL
3 C=PEEK(A+I):H%=I/256:L%=I-H%*256:PRINT#1,"M-R";CHR$(L%);CHR$(H%);CHR$(1)
4 GET#1,A$:IFLEN(A$)=0THENA$=CHR$(0):IFASC(A$)<>CTHENPRINT"X";:NEXTI:POKE65286,TED
5 PRINT"+";:NEXTI:POKE65286,TED

Working version of my program:
1 REM DRIVE BUFFER RAM TEST
5 TRAP 70
6 TED=PEEK(65286)
7 PRINT "CURRENT DISK STATUS:"DS$
10 REM DECLARE VARIABLES
11 I = 0: D1 = 768: D2 = 2047: EC = 0: ED = 0: DB = 0
15 REM FILL THE DRIVE BUFFERS WITH ZEROES
16 PRINT "SENDING DATA TO DRIVE, PASS #1"
17 OPEN 1,8,15 : POKE65286,11 : REM ON 128, USE FAST INSTEAD
18 FOR I = D1 TO D2
19 : H = I/256: L = I - (H*256)
20 : PRINT#1,"M-W";CHR$(L);CHR$(H);CHR$(1);CHR$(DB)
22 NEXT I:CLOSE1
25 REM VERIFY THE DRIVE BUFFERS
26 PRINT "GETTING DATA FROM DRIVE, PASS #1"
27 OPEN 1,8,15
28 FOR I = D1 TO D2
29 : H = I/256: L = I - (H*256)
30 : PRINT#1,"M-R";CHR$(L);CHR$(H);CHR$(1)
31 : GET#1,A$: IF A$="" THEN A$=CHR$(0)
32 : IF A$ <> CHR$(DB) THEN EC = EC + 1
34 NEXT I:CLOSE1
40 REM FILL THE DRIVE BUFFERS WITH 255
41 DB = 255: PRINT "SENDING DATA TO DRIVE, PASS #2"
42 OPEN 1,8,15
43 FOR I = D1 TO D2
44 : H = I/256: L = I - (H*256)
45 : PRINT#1,"M-W";CHR$(L);CHR$(H);CHR$(1);CHR$(DB)
47 NEXT I:CLOSE1
50 REM VERIFY THE DRIVE BUFFERS
51 PRINT "GETTING DATA FROM DRIVE, PASS #2"
53 OPEN 1,8,15
54 FOR I = D1 TO D2
55 : H = I/256: L = I - (H*256)
56 : PRINT#1,"M-R";CHR$(L);CHR$(H);CHR$(1)
57 : GET#1,A$: IF A$="" THEN A$=CHR$(0)
58 : IF A$ <> CHR$(DB) THEN ED = ED + 1
60 NEXT I: CLOSE1: POKE65286,TED : REM ON 128 USE SLOW INSTEAD
65 PRINT"LOOP 1 ERROR COUNT"EC
66 PRINT"LOOP 2 ERROR COUNT"ED
67 END
70 REM ERROR TRAP. THIS WILL ONLY SEE PROGRAM ERRORS, NOT DRIVE ERRORS.
71 PRINT"ERROR!": POKE 65286,TED: REM ON 128 USE SLOW INSTEAD
72 PRINT"COMPUTER ERROR STATUS:"ERR$(ER)
73 PRINT"I/O STATUS:"ST
74 PRINT"DRIVE ERROR STATUS:"DS$
75 PRINT"INDEX LOOP (768 TO 2047):"I
76 CLOSE1
77 PRINT"LOOP 1 ERROR COUNT"EC
78 PRINT"LOOP 2 ERROR COUNT"ED
79 PRINT"DRIVE CHANNEL CLOSED. PROGRAM STOPPED.": END



Posted By

craftsman
on 2014-11-14
22:19:40
 Re: 1541-II drive memory test


Success!! thanks to my neighbour one state to the East JamesC. I can't seem to post a picture on here of it though.

I save each version of the program. The one without the screen blanking failed but all the rest worked fine!

Thanks JamesC





Posted By

JamesC
on 2014-11-15
09:11:07
 Re: 1541-II drive memory test

You're welcome, neighbor to the west. happy

I breezed through when your photo link was active. In my opinion, this one displays your setup better. wink


Posted By

craftsman
on 2014-11-15
11:43:18
 Re: 1541-II drive memory test

I agree and I was trying to change it to this one as well. Thanks

Do you know why the timing is more important on the c16/Plus4 then the 64. As the original program does run on it.

Posted By

JamesC
on 2014-11-15
14:40:01
 Re: 1541-II drive memory test

Same reason a 64+1540 don't get along, or why the 128 can't do 40 columns in fast mode -- incompatible clock rates.

16 and Plus/4's BASIC runs slower than the 64's BASIC. 128 in 40 column mode is even slower. If you want to test the difference, try these one-liners:

Screen on, all machines: TI$="000000": FOR X=1 TO 10000: NEXT: PRINT TI/60
Screen off, 64/128 40 col: P=PEEK(53265):POKE53265,11:TI$="000000":FORX=1TO10000:NEXT:?TI/60:POKE53265,P
Screen off, 16: P=PEEK(65286):POKE65286,11:TI$="000000":FORX=1TO10000:NEXT:?TI/60:POKE65286,P
Screen off, 128 2MHz: FAST:TI$="000000":FORX=1TO10000:NEXT:?TI/60:SLOW

On YAPE, screen on takes 14.966 seconds, screen off takes 8.766 seconds. That's a 41% speed increase ... speed that we can use to keep up with the disk drive. happy

Posted By

Patrick
on 2014-11-16
07:00:36
 Re: 1541-II drive memory test

btw: craftsman, nice collection you have there!

Posted By

MMS
on 2014-11-16
15:04:31
 Re: 1541-II drive memory test

Yeah, I just wanted to ask: I identified the 1541, 1581, any the 1571 too. Even the SD device.

Is that big black fronted CMD HD device? does it really work with C16? what is the capacity?
Or you can use only when play with a C64? I mean some parallel cable needed, right?

Posted By

craftsman
on 2014-11-17
00:51:56
 Re: 1541-II drive memory test

The box is a CMD-100 hard drive that I got in the early 90's. It is connected to the 64 that is just out of the picture on the lower right (you can see the 1750 and Swiftlink that are connected to the 64. The CMD can be connected via the normal IDE cables to the Vic, c16, Plus/4 or 64. If you want really fast speed there is also a parallel cable that can be used with a Ramlink (connected to the 64 or 128). It's pretty fast just via the IDE but the newer sd2ide seems faster.

Although I don't have it connected to the c16 or P4's I don't see why it would not work. You get the most benefit you would need a program like File Browser or jiffyDos on the c16. Just to help with moving around the directories.

If I get a chance over the next week I test it out with a 264 computer and let you know for sure.

Posted By

siz
on 2014-11-17
01:04:57
 Re: 1541-II drive memory test

You mean IEC, don't you? wink

Posted By

MMS
on 2014-11-17
05:29:12
 Re: 1541-II drive memory test

thank you! Would be great to know a working HDd exists for Plus/4 too. I think it would be the very first tested one, right?

Posted By

craftsman
on 2014-11-17
11:31:45
 Re: 1541-II drive memory test

Yes, IEC the normal serial cable for the Commodore's. I bet other people had them hooked up to the Plus/4 back when they came out. Hopefully I'll get to test it tonight.

Posted By

icbrkr
on 2014-11-17
19:16:32
 Re: 1541-II drive memory test

I have a HD hooked up to my C16 and it works fine, though it's a bit overkill.

Biggest problem I have is that all of the partitioning tools, etc, are written for the C64 and 128 so I have to switch platforms to do any work like that.

Posted By

craftsman
on 2014-11-17
20:59:39
 Re: 1541-II drive memory test

Yep, works fine.

And... just what icbrkr said.

Posted By

MMS
on 2014-11-17
22:36:09
 Re: 1541-II drive memory test

aah, managing such a big stuff without folders could be a real pain happy

JiffyDOS does not help in that matter? i though it has some folder commands.
Considering to buy it, as I have an 1571, and (almost) perfectly working Plus/4.

Posted By

craftsman
on 2014-11-17
23:38:27
 Re: 1541-II drive memory test

JiffyDos helps a lot and will allow you to make sub-directories. The HD also has different partitions and they can be set up in several different formats and this is what you need the 64/128 software for. It has 1541 and 71 formats (not the same as d64, d71 and d81) as well as native 65536 block partitions. Also helps formatting a new drive. Once they are set you can move around them with JD using the @cp command and the rest of the normal JD command set.

I believe icbrkr converted his over to scsi compact flash. Mine still had the original 150mb hard drive.

People still use them for BBS's but for most people the sd2iec would do just as good. Having the d64 style formats is a big plus to me.

Posted By

Epy
on 2014-11-18
04:12:20
 Re: 1541-II drive memory test

craftsman:
Can you tell me what kind of S-Video -> VGA converter you use?

Posted By

craftsman
on 2014-11-18
13:02:43
 Re: 1541-II drive memory test

http://www.amazon.com/Etekcity%C2%AE-Composite-S-video-Converter-Upscaler/dp/B00B2B9Z20/ref=sr_1_13?ie=UTF8&qid=1416332473&sr=8-13&keywords=hdmi+to+svideo+converter&pebp=1416332524572

That should be the one. Works pretty good but I do have cables that allow the ohm to be adjusted for the 64.

The set up is kind of cool. The Vic-20, 64 and c16 are all connected to a 4 port switch box. Then it outputs s-video to the HDMI box. It was nice that the Vic-20 would output to the s-video this way (a bit checkered though).

I'm thinking about hacking the 4 port switch to add a 2k ohm adjustable pot for the s-video. Simpler then building each cable with it.

Posted By

Epy
on 2014-11-19
06:06:51
 Re: 1541-II drive memory test

Is this cycle a exact? So the smooth scroll is smooth?

Posted By

craftsman
on 2014-11-19
16:29:27
 Re: 1541-II drive memory test

I'm not sure what you mean by cycle exact but it does a really good job with the c16 and Plus/4. Recently I have been playing the Rocketscience demo and it looks great. I thought there was some issues during the demo so i hooked up a P4 to my Sony monitor and it was the same. So all and all it does a really good job. The main reason that I have it was to display PAL modes in the USA.

Posted By

Epy
on 2014-11-20
02:35:17
 Re: 1541-II drive memory test

If you look at a demo and in the demo there is a smooth scroll. Is that smooth scroll running smooth? I also have S-Video -> VGA converter but these demo effects are not smooth, these scrolls are 'falter'. I don't know this is the right word (google translate) happy

Posted By

craftsman
on 2014-11-20
14:32:43
 Re: 1541-II drive memory test

I would say it does a really good job. There are two sections in the Rocket science demo that there are whole screen images. One scrolls down and the other right to left. The part of the demo that scrolls down is what I compared on the real CRT and found they were very close.

I have noticed that sideways scrolling text like in banners/crack there can be some disruption. Hard to describe. I may try to take a few photos.

Posted By

Epy
on 2014-11-22
09:32:36
 Re: 1541-II drive memory test

OK, thank you.

Posted By

icbrkr
on 2014-11-22
11:07:23
 Re: 1541-II drive memory test

I have 3 total HDs, one on the BBS, one on my other 128D, and one on the C16. Only the BBS computer has a compact flash in it, the rest are all mechanical drives (for now).



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024