polka, because Paul K...

Introduce yourself here!
User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

polka, because Paul K...

Post by polka »

Hi everybody,

I came here, just after reinstalling my (1985) Sinclair QL in front of my big (2007) flat-screen-lcd TV.

Before my abdication and my first PC-purchase (20 years ago), I was a Sinclair fan and had :
- first (like many) a ZX81
- then (like fewer) à QL
But before, I had built myself two personal computers (following Elektor designs) :
- my first one (based on the SC/MP processor) did nothing but blinking leds and beeping
- my second one (based on the Signetics 2650 processor) was linked to a TV to program primitive games (like ping-pong)
The monitior ROM of the first died, but the second still works (not very long, because it is heating like hell)

My ZX81 should still work too (I have to try it some day, together with its expansion RAM and little printer). By the way, I modified my expansion RAM to add a color TV interface.

Then, as soon as it became available in France, I bought a QL and some programming langages (Computer One Forth, Lattice Lisp and Lattice C, etc.). After a (not long) while, I added a Sandy SuperQboard (512K Ram expansion, Toolkit II Rom, disk drive connection - with 2x720K-3.5" floppy drives, parallel printer connection - for a Kodak Diconics 150 inkjet printer, and mouse).

I by now own a lot of programming langages and utilities - but not even ONE game ! And after another while, I replaced my original machines by PC based emulators (first SMSQ/E QPC, and then Daniele's Qemulator), and transfered all QL software to my PCs.

But last week, I reassembled my original system with my new TV, and it's gorgeous ! Here you see it running the C68K compiler - with a front-end SuperBasic program of my own :

This front-end program - like all my boot files - comprises a little procedure called "bye", which never RETURNs ! but which controls menu graphs of any complexity to execute binary programs or SuperBasic procedures at the touch of the 5 function keys F1 to F5.

I join herewith a list of a simple instance of such a boot file, for you to examine this little (13 lines) procedure and see how it works (eventually try it !).

This instance controls a main menu, accessing three binary programs (through F2-F3-F4) and :
- a path to a submenu (through F1) for accessing the four programs of the Psion suite
- an escape to SuperBasic (through F5)
The Psion suite sub-menu runs the Psion programs by pressing (F2-F3-F4-F5) and goes back to main menu through F1.

The "bye" procedure goes from line 32751 to 32763, but the menu graph definition is contained in DATA statements (main menu goes from 32741 to 32750, Psion sub-menu from 32721 to 32730). You may define your own menu graphs with any level of complexity, only adding your own DATA statements.

At the end of the file there are a few SuperBasic commands for windows initialisation and boot activation (calling "bye").

Bye ! Paul

Code: Select all

REM   A simple function-key-driven Boot file

REM   This boot file is on a bootable support
REM   dev$, which must also contain all the
REM   programs that can be exec'ed by hitting
REM   the function keys, properly configured,
REM   and with their help and other annex files

REM   Copyright: Paul KOPFF, CLAMART (FRANCE)

REM   Data for the PSION SUITE sub-menu display

32721 DATA  80,7,'  M A I N  ','  M E N U  '
32722 DATA   2,7,'   PSION   ','   EASEL   '
32723 DATA   2,7,'   PSION   ','  ABACUS   '
32724 DATA   2,7,'   PSION   ','  ARCHIVE  '
32725 DATA   2,7,'   PSION   ','   QUILL   ',32726

REM   Jump-table for the PSION SUITE sub-menu

32726 m=32741 : bye : REM back to main menu
32727 EXEC_W dev$ & 'easel'      : bye
32728 EXEC_W dev$ & 'abacus'     : bye
32729 EXEC_W dev$ & 'archive'    : bye
32730 EXEC_W dev$ & 'quill'      : bye

REM   Data for the main menu display

32741 DATA 208,7,'   PSION   ','   SUITE   '
32742 DATA   2,7,' MetaComCo ',' Text EDIT '
32743 DATA   2,7,'ComputerOne','   FORTH   '
32744 DATA   2,7,' MetaComCo ','  L I S P  '
32745 DATA  80,7,'   SUPER   ','   BASIC   ',32746

REM   Jump-table for the main menu

32746 m=32721 : bye : REM to PSION SUITE sub-menu
32747 EXEC   dev$ & 'ed'         : bye
32748 EXEC   dev$ & 'forth'      : bye
32749 EXEC   dev$ & 'lisp'       : bye
32750 CLS : STOP    : REM escape to Super Basic

REM   Menu management procedure BYE

32751 DEFine PROCedure bye
32752 RESTORE m :
32753 PAPER#33,0 : INK#33,4 : MODE 4 : AT#33,0,7
32754 PRINT#33,' F1',,'F2',,'F3',,'F4',,'F5'
32755 FOR i = 5 TO 69 STEP 16
32756    READ p , q , p$ , q$
32757    PAPER#33,p : INK#33,q
32758    AT#33,1,i : PRINT#33,p$
32759    AT#33,2,i : PRINT#33,q$
32760 END FOR i
32761 p = CODE(INKEY$(-1))/4
32762 IF p<58 OR p>62 : GO TO 32761
32763 READ q : GO TO p+q-58

REM   BOOT install commands

      dev$='flp1_'

      WINDOW#0,388,42,110,4
      PAPER#0,2 : INK#0,7 : BORDER#0,1,7
      WINDOW#1,88,216,20,4
      PAPER#1,0 : INK#1,2 : BORDER#1,1,7
      WINDOW#2,388,172,110,48
      PAPER#2,0 : INK#2,4 : BORDER#2,1,7
      OPEN#33,scr_512x34a0x222
      PAPER#33,0 : INK#33,4 : border#33,1

REM   BOOT activation
      
m=32741 : bye
Last edited by polka on Tue Dec 01, 2020 4:24 pm, edited 3 times in total.


May the FORTH be with you !
POLKa
prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

Re: polka, because Paul K...

Post by prime »

Is your SuperQBoard, one with the built in mouse interface ?

If it is, would you be so kind as to make me a copy of the rom ? You should be able to do this by using sbytes to dump the area from $C0000 to $C7FFF.

I have a SuperQBoard, (well a SuperDisk really, but it's the same PCB, just without the 512K), but it does not have the mouse interface chips fitted, I have the chips ready to fit, but will need an image of the rom with the mouse interface to make it work....

Cheers.

Phill.


User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: polka, because Paul K...

Post by vanpeebles »

Welcome Polka!


User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: polka, because Paul K...

Post by polka »

Thanks !

After a little while (of furious searching), I found (in various places) all my twenty+ years old Sinclair hardware :

1 basic 128K QL with its power supply and a colour monitor plus a self made special SCART cable : this cable let me switch the G and B components of the RGB signals ; so that I may get RED-BLUE-WHITE/BLACK instead of RED-GREEN-WHITE/BLACK, for high resolution graphics viewable in 3D with BLUE-RED spectacles.

1 other 128K QL with a modified power supply (including an ON/OFF switch) plus a self made SCART cable suitable for a TV : this cable outputs a TV/AV switch signal that some TV sets require.

1 512K Sandy SuperQboard, modified to accept also a (2 buttons) mouse ; with :

1 double (3.5" - 720K) floppy disk drive

1 Diconix 150 inkjet printer (on the parallel port) : I had some trouble finding the power supply of this, but I finally got it ; if I had not, the device might have worked with NiCd batteries.

1 "precious" SER cable, for connecting with a PC

1 JoyStick cable

and even my Lattice C compiler "secure dongle". but nowadays, I use C68K.

plus a lot of old MDVs (empty or with original software) : When I got the 3.5" floppy disk drive unit, I have already moved all my software onto 3.5" disks ; but yesterday :

I wanted to retrieve my original version of my "Computer One FORTH" (why ? I will explain below*) and it failed :

Actually, there is a little (very small !!!) "pressor" foam pad glued on a tiny spring in each MDV, and after 20 years, these pads reduce to "dust", so you may get read errors. On my original FORTH MDV, I thus had to replace this pad, and I succeded with some black "velvet" used in 135 (24x36) photographic film cartriges. I fear I will have to do this with all the MDVs that I want to reuse. Anyway, the good news is that on both my QLs, the MDV units are still working very well.

*So why did I want to get back to the original MDV of my Computer One Forth ?
Because I had noticed (in these old times) that it was bugged ; and did analyse and patch directly its machine code ; then forgot entirely about the bugged version (that remained only on the original Computer One microdrive cartridge).
Now I can compare, and remember the patches that I did : it concerns the "flooring" of integer division words (all derived from the machine code word M/MOD), the D+! word that does not work at all and the NOT word that actually does the same thing as the 0= word, but according to the Forth83 standard should not.

Paul
Last edited by polka on Thu Mar 17, 2011 7:22 am, edited 2 times in total.


May the FORTH be with you !
POLKa
RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: polka, because Paul K...

Post by RWAP »

The little felt pad in the microdrive cartridges is a real pain - on many occasions, part of it gets inside the cartridge, and then jams the tape completely.

Can you have a look at the software thread for the missing QL software titles, in case you have any on disk or cartridge?

There are several other versions of Forth available - see http://www.dilwyn.me.uk/language/index.html

If you have managed to retrieve the patched version of Forth, I would be interested in it for the QL software preservation project - I seem to remember reading that Computer One had allowed their software to be made freely downloadable from Jean-Yves Rouffiac's website (although that now seems to be down - I may be wrong...)


User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: polka, because Paul K...

Post by polka »

What I said I have retrieved, is the original Computer One FORTH microdrive cartridge content, that had some bugs. At this time, I have on the same Qdos 3.5" floppy the original (bugged) version and the FORTH executable where I patched corrections for the bugs that I found. All this analysis and correction, I did it some twenty years ago and since, I used only the corrected version - that showed no new bugs, so I surmise that it is now "bug-free".

I will send them to you for sure, but let me first analyse again and document what I did, and test it thoroughly both on my original QL machines and on my Q-emulator. To do this, I will have to figure first how to restore a SER link between my QL machine and the PC that I own now (that no longer has a 3.5" floppy drive, nor an RS232 plug). I have to try an USB/RS232 interface that I bought for this...

So please be patient, when I get everything OK, you will get it suitable and checked for Q-emulator, up to you to copy it back to QL flps or mdvs.

Bye ! Paul


May the FORTH be with you !
POLKa
RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: polka, because Paul K...

Post by RWAP »

polka wrote:What I said I have retrieved, is the original Computer One FORTH microdrive cartridge content, that had some bugs. At this time, I have on the same Qdos 3.5" floppy the original (bugged) version and the FORTH executable where I patched corrections for the bugs that I found. All this analysis and correction, I did it some twenty years ago and since, I used only the corrected version - that showed no new bugs, so I surmise that it is now "bug-free".

I will send them to you for sure, but let me first analyse again and document what I did, and test it thoroughly both on my original QL machines and on my Q-emulator. To do this, I will have to figure first how to restore a SER link between my QL machine and the PC that I own now (that no longer has a 3.5" floppy drive, nor an RS232 plug). I have to try an USB/RS232 interface that I bought for this...

So please be patient, when I get everything OK, you will get it suitable and checked for Q-emulator, up to you to copy it back to QL flps or mdvs.

Bye ! Paul
OK Paul - that would be great - I use a HxC floppy disk emulator now to move stuff between the QL and PC using an SD memory card... :-)


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: polka, because Paul K...

Post by RWAP »

I have a couple of Sandy Mouse QBoard v1.18 EPROMs here, if anyone needs them.


User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: polka, because Paul K...

Post by polka »

Hi, all !

AND This is the "boot" file that I use with my C68k development system :

Code: Select all

tk2_ext
pointer
a = RESPR(4992):LBYTES 'flp1_wman',a:CALL a
a = RESPR(5036):LBYTES 'flp1_ramprt',a:CALL a
a = RESPR(23910):LBYTES 'flp1_HOTKEY',a:CALL a
HOTKEY

32640 DEFine PROCedure QF: INPUT#0,"Which file ? ";P$:INPUT#0,"What goals ? ";Q$:IF p$<>"":p$="-f "&p$
32641 END DEFine
32642 DEFine PROCedure RU(PR$,PA$):Cls#2:EXEC_W dat$&PR$,#2,#2,#2;PA$:END DEFine
32643 DEFine PROCedure XX:nnn=LEN(r$(1)):RU r$(1,4 TO nnn-2),"":END DEFine

32644 DATA 18,4,0,2,0,2,2,0,7,7,12
32645 DATA 12,2,"3K"," -=3072",5,18,2
32646 DATA 12,2,"5K"," -=5120",5,18,3
32647 DATA 12,2,"7K"," -=7168",5,18,4
32648 DATA 12,2,"9K"," -=9216",5,18,1
32649 DATA 24,2,"VERBOSE"," -v",7,1,6
32650 DATA 24,2,"LACONIC","",7,1,5
32651 DATA 41,2,"ANSI"," -unproto",9,5,8
32652 DATA 41,2,"K&R ","",9,5,7
32653 DATA 53,2,"16 bits"," -Qshort",13,7,10
32654 DATA 53,2,"32 bits","",13,7,9
32655 DATA 30,7,"","   flp2_mydir_",12,14,4
32656 DATA 30,8,"","   myprog_c",15,11,1
32657 DATA 30,4,""," -Iflp2_",14,9,2
32658 DATA 30,5,""," -Lflp2_",11,13,3
32659 DATA 10,12,"Floating point & Maths         flp1_LIB_LIBM_a"," -lm",16,12,15
32660 DATA 10,13,"Dynamic allocations       flp1_LIB_LIBMALLOC_a"," -lmalloc",17,15,16
32661 DATA 10,14,"debug support              flp1_LIB_LIBDEBUG_a"," -ldebug",18,16,17
32662 DATA 10,15,"Semaphores and tasking       flp1_LIB_LIBSEM_a"," -lsem",1,17,18
32663 DATA 0,1,0,0,1,0,0,1,0,1,1,1,1,1,0,0,0,0,11
32664 DATA 1,1,0,4,"COMPILE AND LINK OPTIONS :"
32665 DATA 4,2,0,4,"Stack :      Mode :           Norm :       Int :"
32666 DATA 0,3,0,7,"----------------------------------------------------------------"
32667 DATA 7,4,0,4,"My Include Directory :"
32668 DATA 7,5,0,4,"My Library Directory :"
32669 DATA 0,6,0,7,"----------------------------------------------------------------"
32670 DATA 7,7,0,4,"My Project Directory :"
32671 DATA 7,8,0,4,"My Current File Name :"
32672 DATA 0,9,0,7,"----------------------------------------------------------------"
32673 DATA 1,10,0,4,"Standard Libraries to scan :"
32674 DATA 10,11,0,7,"Standard C LIBRARY             flp1_LIB_LIBC_a"

32675 DEFine PROCedure INITFORM
32676 o=32644:RESTORE o:READ m:DIM f(m):READ n:DIM r$(n,32)
32677 DIM CC(7):FOR i=0 TO 7:READ CC(i):NEXT i:READ cp
32678 RESTORE o+m+1:FOR i=1 TO m:READ f(i):NEXT i:READ MMM
32679 FOR i=1 TO m:READFLD(o+i):IF m$="":r$(jt)=n$
32680 END DEFine 

32681 DEFine PROCedure EDITFORM
32682 o=32644:CLS#2:RESTORE o+m+2
32683 FOR i=1 TO MMM:READ x,y,jp,jt,m$:PAPER#2,jp:INK#2,jt:AT#2,y,x:PRINT#2,m$
32684 c=cp:READFLD(c+o)
32685 c=NEXTFLD(c):IF c<>cp:GO TO 32685
32686 REPeat ScanKeyb
32687 a=CODE(INKEY$(-1))
32688 SELect ON a
32689 ON a=208:c=PREVFLD(c)
32690 ON a=216:c=NEXTFLD(c)
32691 ON a=32:c=TOGGLE(c)
32692 ON a=10:DISPFLD c,0:EXIT ScanKeyb
32693 ON a=27:bye
32694 END SELect 
32695 END REPeat ScanKeyb
32696 FOR i=1 TO m
32697 READFLD(o+i):IF m$="":n$=r$(jt)
32698 IF ((m$<>"") OR ((jt>1) AND (jt<n))) AND (f(i)=1):p$=p$&n$
32699 END FOR i
32700 dat$=r$(n,4 TO LEN(r$(n)))
32701 END DEFine 

32702 DEFine FuNction CCC$(opt)
32703 p$=" -tmpflp2_":EDITFORM:INK#2,4:CLS#2:nnn="_c"INSTR r$(1)
32704 IF nnn=0:nnn=len(r$(1))+1:r$(1)=r$(1)&"_c"
32705 IF opt=0:p$="-c "& dat$ & r$(1,4 TO nnn+1)&" "&p$
32706 IF opt=1:p$="-o"&dat$&r$(1,4 TO nnn-1)&" "&dat$&"*_o "&p$
32707 EXEC_W CC,#2,#2,#2;p$
32708 PRINT#0," Done... Hit any key !";:return inkey$(-1)
32709 END DEFine 

32710 DEFine FuNction TOGGLE(i)
32711 IF m$="" THEN 
32712 EDITFLD(jt)
32713 ELSE 
32714 IF jt=i :f(i)=1-f(i)
32715 IF jt<>i:f(i)=0:i=jt:f(i)=1:READFLD(i+o)
32716 END IF 
32717 DISPFLD i,1:RETurn i
32718 END DEFine 

32719 DEFine FuNction PREVFLD(i)
32720 DISPFLD i,0:i=jp:i=FINDFLD(i):DISPFLD i,1:RETurn i
32721 END DEFine 

32722 DEFine FuNction NEXTFLD(i)
32723 DISPFLD i,0:i=jn:i=FINDFLD(i):DISPFLD i,1:RETurn i
32724 END DEFine 

32725 DEFine PROCedure DISPFLD(i,s)
32726 PAPER#2,CC(2*f(i)+s):INK#2,CC(4+2*f(i)+s)
32727 AT#2,y,x:PRINT#2,m$;:IF m$="":PRINT#2,r$(jt,4 TO)
32728 END DEFine 

32729 DEFine PROCedure EDITFLD(ii)
32730 PAPER#2,CC(2*f(i)):INK#2,CC(4+2*f(i))
32731 AT#2,y,x:PRINT#2,FILL$(" ",29)
32732 AT#2,y,x:INPUT#2,O$:r$(ii)=r$(ii,1 TO 3)&O$
32733 END DEFine 

32734 DEFine PROCedure READFLD(l)
32735 RESTORE l:READ x:READ y:READ m$:READ n$:READ jn:READ jp:READ jt
32736 END DEFine 

32737 DEFine FuNction FINDFLD(i)
32738 READFLD(i+o):IF (jt<>i)AND(f(i)=0):i=jt:GO TO 32738
32739 RETurn i
32740 END DEFine 

32741 DATA   2,7,' C68K      ','      EDIT '
32742 DATA   2,7,' C68K      ','   COMPILE '
32743 DATA   2,7,' C68K      ','      LINK '
32744 DATA   2,7,' C68K      ','      MAKE '
32745 DATA  80,7,'   SUPER   ','   BASIC   ',32746
32746 EXEC_W QED:bye
32747 CLS#0:PRINT#0,"Compiling...";:PRINT#0,CCC$(0):bye
32748 CLS#0:PRINT#0,"Linking...";:PRINT#0,CCC$(1):bye
32749 QF:EXEC_W MAKE,#2,#2,#2;p$ & " -t " & Q$:bye
32750 CLS:CLS#0:PRINT#0,'Say BYE to quit SUPER BASIC':STOP

32751 DEFine PROCedure bye
32752 MODE 4:CSIZE#3,2,1:CLS#3
32753 PAPER#2,0:INK#2,4:CLS#2:VIEW#2,dev$ &'help'
32754 o=32741:RESTORE o:CLS:CLS#0
32755 PRINT#3,"   POLKA's SuperBasic C68K Setup'n Run !"
32756 PAUSE 250:PAPER#3,0:INK#3,4:csize#3,0,0:cls#3:AT#3,0,7
32757 PRINT#3,' F1',,'F2',,'F3',,'F4',,'F5'
32758 FOR i = 5 TO 69 STEP 16
32759 READ p,q,p$,Q$
32760 PAPER#3,p:INK#3,q
32761 AT#3,1,i:PRINT#3,p$
32762 AT#3,2,i:PRINT#3,Q$
32763 END FOR i
32764 p = CODE(INKEY$(-1))/4
32765 IF p<58 OR p>62:GO TO 32764
32766 PAPER#3,0:READ q:GO TO p+q-58

dev$='flp1_':PROG_USE dev$

WINDOW#0,388,42,110,4:PAPER#0,2:INK#0,7:BORDER#0,1,7
WINDOW#1,88,216,20,4:PAPER#1,208:INK#1,7:BORDER#1,1,7
WINDOW#2,388,172,110,48:PAPER#2,0:INK#2,4:BORDER#2,1,7
OPEN#3,scr_512x34a0x222:PAPER#3,0:INK#3,4:border#3,1,0

initform:bye
This boot file needs also the following little text file called "help", to VIEW :

Code: Select all

When using COMPILE (F2) or LINK (F3), a setup form will replace
this HELP screen. Some  of the options will be set or disabled,
depending on what this program assumes when booting and on what
you have already done since that time. The field you would most
likely modify will be highlighted: that is the filename.

Remember that you can step through the fields using the ¾ and ¿
keys. ENTER key starts compiling or linking, ESC key exits.

The SPACE BAR has different functions depending on the fields:
- sometimes it will let you step through different options.
- sometimes it will let you activate or inhibit an option.
- sometimes it will erase a field, and let you input something.

All this was meant to be intuitive. Feel free to experiment !!!

you can see a link to a screenshot at the beginning of this thread ! (first msg : "it's gorgeous")

It actually is a "front-end" for configuring and running the three basic operations : compile, link and make (using F2, F3 and F4 to start) ; and F1 to start the QED text editor and F5 to escape to Super-Basic command mode.

To be able to set-up a nice 720K C68K development disc, I had to squeeze on it a lot more than what was on the C68k Runtime1 original disc : MAKE would need a lot of other execs that were on Runtime2, and I wanted to save my second floppy unit for programs under development. So I had to "purgate" all the INCLUDE files of any comments and other non-useful (tab, etc.) characters. And I definitely got rid of the supplied Exec front-end that I found both too big and no so clever... Thus in the end, I even had enough room for Qjump software add-ons : Pointer interface with Wman and Hotkey...

There are only 3 sectors left on this disc (from 1434).

Paul

By the way, since I installed my old QL on the TV set, I rarely watch another channel :D
Last edited by polka on Sun Jun 05, 2011 8:49 am, edited 3 times in total.


May the FORTH be with you !
POLKa
User avatar
dex
Gold Card
Posts: 286
Joined: Thu Dec 23, 2010 1:40 pm

Re: polka, because Paul K...

Post by dex »

I tried to google for the C68K for QL, but nothing found.
Will your disk be available to download as files for emulator or the real machine?


Post Reply