Fig-Forth

wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: Fig-Forth

Post by wawa.voun »

Hi Mark,

Dont be sorry ! We all do a lot of mistakes...

Thanks for this new version, I will give a try this evening.

Regards.
Philippe
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: Fig-Forth

Post by wawa.voun »

HI Mark,

Tada !!!!

This image boot. I got the Junior prompt then Forth prompt.
Hit enter give "OK".
The I typed in '15 5 + .' and got a '20 OK' so basically it works.

Fig-Forth 1 manual say to try '0 BLOCK 64 TYPE' to test if disk system is working... Floppy doesnt even move and of course nothing is displayed.
Is there an installation procedure ?

S-Forth manual found on this forum give a list of preparation to do before using Forth mainly related to disk access... But it is for Fig-Forth 1.1 !

It is convenient for a beginner to have a manual.

I look inside this C1P-S-Forth.65D image found on your site and track 0 and 1 are very similar. After a OSIHFE clean I made the same modifications as you.
I got a disk which boot with the Junior prompt, then the S-Forth prompt but then...
-RUN"BEXEC*- is displayed two times and I think that Forth try to interpret disk readings and this give an endless display of strange characters with a lot of -OK-. I have to reset.

But may be not so far from the target to get S-Forth running and have a manual !

I also see that when copying this image I got an error reading track 39... I look at this track but dont really see a problem. On the Fig Forth image the track is fill with $00 and here there is lot lot of $20 instead. But situation is the same on other tracks (38, 37...) without error.

The image is here joined.

Anyway great thank for your help ! Get Fig-Forth running on a OS65D Junior Computer is probably a first !

Regards.
Philippe
Attachments
Junior-S-Forth_clean.65D.zip
(9.88 KiB) Downloaded 110 times
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: Fig-Forth

Post by wawa.voun »

I have also give a try to Z-Forth.
Its OS65D V3.3 based.
The working image for Junior Computer is below.
Will try to find a manual...

Regards.
Philippe
Attachments
Junior-Z-Forth_clean.65D.zip
(19.57 KiB) Downloaded 112 times
Mark
Posts: 297
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Fig-Forth

Post by Mark »

You are very close with C1P-S-Forth.65D
For some reason, the default I/O devices are not set by S-Forth as they are with FigForth, so you need to modify the input device default from "Memory" to console. Change disk offset $0124 to 02 from 10 This is location $2321 in memory. This is where the RUN BEXEC* input was coming from. The following byte is the default output device which is also already 02.

Afterwards you should see:
*DOS JUNIOR COMPUTER V2.0*

COPYRIGHT BY ELEKTOR
Digital Systems S-FORTH V1.1
OK
5 15 + . 20 OK


The only other changes I have done for Dos3.3 were from your "mod 0" image. At disk image offset $0D8C change to 4C B0 2E from A9 34 8D ($2E84 in memory) to skip PIA write & CPU speed test. However this doesn't seem to be used or present in the other Forth images so it is not important.

The Z-Forth disk has many tracks that contain no sectors. The disk was Iniz? 'd but no sector data was ever written to them.
You can see tracks layout with osihfe -t Junior-Z-Forth_clean.65D.

So that is where my knowledge ends. I have no experience with Forth, and no documentation other that what was posted here. The disk images were provided by others.

What do you intend to do with your FPU? It might be possible to patch the math routines in Microsoft BASIC to use that instead.

Please explain how to reproduce any segfault with osihfe. That should not happen.
When you got an error copying track 39, what copy utility were you using?

Thanks,
-Mark
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: Fig-Forth

Post by wawa.voun »

Hello Mark,

I do the copy with option 8 of BEXEC* (from B Gotek to A real floppy).

The segfault come during a try to convert from 65D to HFE.
But at this moment :
- I dont have clean the original S-Forth image before opening them with hex editor
- I copy track 0 and track 1 from our last Fig-Forth image and paste them into the S-Forth image but I realise after that the hex editor paste INSERT bytes and not overwrite bytes
- so the the file become probably very strange with two track 0 and track 1 and also a faulty size...

I will redo that this evening and send you by PM this faulty image.

Patching Basic to use the FPU board will be a must but an assembly listing is required...
And may be some initial explanations to understand how Basic works inside.

I have reproduce a design call "Microcrunch". See
http://archive.6502.org/publications/mi ... pdf#page=9
and
http://archive.6502.org/publications/mi ... df#page=85

The usage of the FPU is really easy (basically it is just some short LDA and STA sequences to the right address may be followed by some time management by polling to be sure the FPU job is finished)...

For me the steps could be :
- get an asm listing of Basic and learn how to compile and use the binary (could be in the Junior or in a pc fe with A65)
- understand Basic floating representation and how floating operations works
- add two routines for convert from and to Basic floating point representation to FPU floating point representation
- replace the four basic + - * / floating number routines by new ones using the fpu
- do same with other functions sin cos etc...

I will think to that.

If you are interested adapt the design to a OSI hardware should not be hard... With a schematic I can do that and supply the gerber files.

Regards.
Philippe
Mark
Posts: 297
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Fig-Forth

Post by Mark »

I've attached the S-Forth disk that you posted earlier with the 1 byte change that should work for you.

So the good news is there is a documented Microsoft BASIC source available. See "Create your own Version of Microsoft BASIC for 6502" and the archive on Github. However the buildable OSI version is for ROM BASIC, which differs slightly from OS65D versions, but may be a good place to start. You could build your own custom version with the latest fixes...

I didn't realize OSI used 6 Digit BASIC (32bit) due to size constraints when 9 Digit BASIC (40bit) was available. I wonder what the disk version uses?

Thanks for sending the 65D file that segfaults osihfe (Also please let me know what version you have). It may have been something I already fixed. I need to post the current version...
Also please let me know what firmware your Gotek is using. Perhaps it is a disk image problem?

I have too many projects going to start the FPU board, but it sounds interesting.
Cheers,
-Mark
Attachments
Junior-S-Forth_Jr.zip
S-Forth boots on Elector Jr?
(9.83 KiB) Downloaded 106 times
wawa.voun
Posts: 49
Joined: Sun Nov 22, 2020 5:59 pm

Re: Fig-Forth

Post by wawa.voun »

Re,

I have OSIHFE version 2.21.

S-Forth now is working well. Even the init sequence give in the manual get well.

Just one question : just after the boot the floppy drive motor stay indefinitely on. If I made a disk access into Forth then the timeout start to work and the motor stop after some time.
Could this be something to change into track 0 or 1 or, more probably, is the problem into S-Forth ?
Z-Forth has not the problem. I must check that with Fig-Forth.

Philippe
Post Reply