Fun with CBM arithmetics, Part II

Modding and Technical Issues

Moderator: Moderators

Post Reply
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Fun with CBM arithmetics, Part II

Post by Mike »

So, after nearly 4 years I started this project I finally went to retire the original BASIC ROM of my VIC-20 (it's the chip with the Part Nr. 901486-01, together with some other removed parts - they still all work!):

Image

Instead an EPROM with custom configuration (built by vintage-computers.it) took its place. Two collegues from the electronic workshop at my workplace were so kind to extract the ROM and place a socket instead. :D

Image

... and in all its glory:

Image

Now *my* VIC-20 doesn't anymore mess up multiplying numbers as can be seen in this video (basic-p.avi - warning: ~16 MB. But try it out on your own VIC-20 ... :mrgreen:).

Cheers,

Michael
norm8332
Vic 20 Nerd
Posts: 626
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: Fun with CBM arithmetics, Part II

Post by norm8332 »

That's cool, I wasn't even aware of the bug. Is there a patched bin file available?
“In religion and politics people’s beliefs and convictions are in almost every case gotten at second-hand, and without examination... whose opinions about them were not worth a brass farthing.”

-Autobiography of Mark Twain
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Fun with CBM arithmetics, Part II

Post by Mike »

norm8332 wrote:Is there a patched bin file available?
You can create one from a *.bin file of the original BASIC ROM with this patch (download):

Code: Select all

10 OPEN2,8,2,"BASIC,S,R"
11 OPEN3,8,3,"BASIC-P,S,W"
12 READB,C,D
13 FORT=49152TO57343
14 GET#2,A$:A=ASC(A$+CHR$(0))
15 IFB<>TTHEN18
16 IFA<>CTHENPRINT"BAD SOURCE FILE!":GOTO20
17 A=D:READB,C,D
18 PRINT#3,CHR$(A);
19 NEXT
20 CLOSE3
21 CLOSE2
22 :
23 DATA 55900,131, 90
24 DATA 55901,217,223
25 DATA 57178,170,165
26 DATA 57179,170, 41
27 DATA 57180,170,133
28 DATA 57181,170,112
29 DATA 57182,170,165
30 DATA 57183,170, 40
31 DATA 57184,170,133
32 DATA 57185,170, 41
33 DATA 57186,170,165
34 DATA 57187,170, 39
35 DATA 57188,170,133
36 DATA 57189,170, 40
37 DATA 57190,170,165
38 DATA 57191,170, 38
39 DATA 57192,170,133
40 DATA 57193,170, 39
41 DATA 57194,170,160
42 DATA 57195,170,  1
43 DATA 57196,170,152
44 DATA 57197,170, 74
45 DATA 57198,170,133
46 DATA 57199,170, 38
47 DATA 57200,170, 96
48 DATA    -1, -1, -1
norm8332
Vic 20 Nerd
Posts: 626
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: Fun with CBM arithmetics, Part II

Post by norm8332 »

Great, so I just have the bin dump of the Basic ROM (filename: BASIC) on drive 8 and I'm ready to go. I have an EPROM-ROM adapter, I'm going to give it a try. Thanks.
“In religion and politics people’s beliefs and convictions are in almost every case gotten at second-hand, and without examination... whose opinions about them were not worth a brass farthing.”

-Autobiography of Mark Twain
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Fun with CBM arithmetics, Part II

Post by Mike »

norm8332 wrote:Great, so I just have the bin dump of the Basic ROM (filename: BASIC) on drive 8 and I'm ready to go.
The file should exclude the load address. [1] With VDrive of VICE (using a PC directory as mounted drive with True Drive Emulation off) or outside disk images with a SD2IEC, the file type doesn't matter - I set it to SEQ with the patch program to connote that it's a *.bin and not a *.prg file and thus excludes the load address.

Should the latter make trouble because you go the way of transferring the file over a real disk to apply the patch - and in case the transferring program does not support writing SEQ files - you can change ",S,R" and ",S,W" to ",P,R" and ",P,W", respectively.

Greetings,

Michael


[1] Should be commonplace with PC hosted EPROM burners. Lots of VIC-20 or C64 based EPROM burners work with *.prg files, though.
norm8332
Vic 20 Nerd
Posts: 626
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: Fun with CBM arithmetics, Part II

Post by norm8332 »

Update: I made the patched basic ROM as shown above, burned to an EPROM and installed into a VIC and it's working great! I'm currently running the Mandelbrot zoomer as shown here: http://sleepingelephant.com/ipw-web/bul ... =15#p73789 to verify and visualize the fix. It will take awhile to run on the actual VIC-20, I will update with the results when it's done.

For testing, I installed the ROM in a resurrected from scrap VIC with a homemade 2764 to 2364 adapter as shown in the picture. The kernel on this VIC is stock with an EPROM replacement also. Definitely not anywhere near the nice clean CR VIC-20 Mike posted above..this thing is literally built out of spare parts and scrap but it works fine.
P1010697.jpg
EDIT: After 19 hours running full tilt... It worked perfectly. No sign of the bug. Thanks Mike.
P1010698.jpg
“In religion and politics people’s beliefs and convictions are in almost every case gotten at second-hand, and without examination... whose opinions about them were not worth a brass farthing.”

-Autobiography of Mark Twain
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Fun with CBM arithmetics, Part II

Post by Mike »

norm8332 wrote:After 19 hours running full tilt... It worked perfectly. No sign of the bug. Thanks Mike.
Now *that* is what I'd call a burn-in test! 8)

The result for sure is pixel-for-pixel identical to the right picture ("zoom_ok.png") in the other thread. With the original BASIC ROM, the fine structures along a horizontal stripe and along a vertical stripe are severely distorted and torn (and where these stripes overlap, the effect gets even worse). There's one very noticeable detail in the upper left part of the defective zoom, where two spiral arms nearly touch - which they don't do with correct math.

How hot did the PSU get?
norm8332
Vic 20 Nerd
Posts: 626
Joined: Sun Nov 13, 2016 11:04 am
Location: USA

Re: Fun with CBM arithmetics, Part II

Post by norm8332 »

Mike wrote:
norm8332 wrote:After 19 hours running full tilt... It worked perfectly. No sign of the bug. Thanks Mike.
Now *that* is what I'd call a burn-in test! 8)

The result for sure is pixel-for-pixel identical to the right picture ("zoom_ok.png") in the other thread. With the original BASIC ROM, the fine structures along a horizontal stripe and along a vertical stripe are severely distorted and torn (and where these stripes overlap, the effect gets even worse). There's one very noticeable detail in the upper left part of the defective zoom, where two spiral arms nearly touch - which they don't do with correct math.

How hot did the PSU get?
Yeah real good test, and it passed with flying colors! The power supply gets barely warm because it is fed with a DC switching buck converter (the small white box on the right) that is set to put out 10.0 VDC. After it passes through the bridge rectifier in the VIC you have 8.5VDC going to the regulator That is only 1.5V above the drop-out voltage of the regulator and makes it run very efficiently so it generates very little heat.
Last edited by norm8332 on Sun Dec 24, 2017 5:42 pm, edited 1 time in total.
“In religion and politics people’s beliefs and convictions are in almost every case gotten at second-hand, and without examination... whose opinions about them were not worth a brass farthing.”

-Autobiography of Mark Twain
Post Reply