BasiCode sur Thomson ?

C'est le lieu des discussions diverses et variées, mais toujours en rapport avec le thème général du forum et dans l'esprit de celui-ci. Contient des rubriques électroniques.

Modérateurs : Papy.G, fneck, Carl

Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

other emulations in the browser

Message par ThomasR »

The link http://zx81-siggi.endoftheinternet.org/ ... /basicod3/ didn't work for some weeks - yesterday the problems were solved and you can use it again.
zx-siggi.png
zx-siggi.png (73 Kio) Consulté 4827 fois
If there are problems again you can watch the discussions about that subject here: http://forum.tlienhard.com/phpBB3/viewt ... &start=125 .

Here https://floooh.github.io/tiny8bit/ is another interesting website where you can use some other homecomputers directly in the browser (not only for BasiCode).
tiny8bit.png
tiny8bit.png (125.13 Kio) Consulté 4832 fois
Have fun!
Xavier_AL

Re: BasiCode sur Thomson ?

Message par Xavier_AL »

Thanks a lot Thomas.
:D
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

new address of Siggi's ZX81-webserver

Message par ThomasR »

Hello friends,

Siggi's webserver has a new hardware and a new address: http://zx81-siggi.zx-team.org/ZxTeaM.

The BasiCode programs are here http://zx81-siggi.zx-team.org/d:applic/hrg/basicod3/ now.

And here is something new for the Easter holidays: https://forum.tlienhard.com/phpBB3/view ... 387#p48387
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Rubik's Cube

Message par ThomasR »

Here http://www.kc85emu.de/rt/kubuskcc.bas is a refreshed BasiCode program (first version 1985) that helps to solve the Rubik's Cube. It is ready to run for the Amstrad CPC128.
KUBUSCOL.png
KUBUSCOL.png (17.9 Kio) Consulté 3064 fois
infos and screenshots:
https://www.robotrontechnik.de/html/for ... adid=13599

Have fun!

EDIT: Now you can find it on a DSK-file here: http://forum.system-cfg.com/viewtopic.p ... 93#p228193

EDIT: The disk image file had a mistake. The corrected version is there: http://forum.system-cfg.com/viewtopic.p ... 01#p231601 .

EDIT: There was still another mistake. The latest version is on this disc image (and some other programs):
viewtopic.php?p=232386#p232386
Amstrad CPC: only in MODE 0 enough colors for the kubus program. OTHELLO runs fine in MODE 1, but with other colors than in MODE 0 (where are not enough letters per line).
Amstrad CPC: only in MODE 0 enough colors for the kubus program. OTHELLO runs fine in MODE 1, but with other colors than in MODE 0 (where are not enough letters per line).
CP_M.png (63.11 Kio) Consulté 2316 fois
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

new provider for Siggi's server

Message par ThomasR »

ThomasR a écrit : 27 mars 2019 11:03 The link http://zx81-siggi.endoftheinternet.org/ ... /basicod3/ didn't work for some weeks - yesterday the problems were solved and you can use it again. (...)
The address is now: http://zx81.ddns.net/ZxTeaM , then click on /d:/ and so on.
Pfad_edit_442969583396989.jpg
Pfad_edit_442969583396989.jpg (182.85 Kio) Consulté 1747 fois
New: There are some new files for the Memopak-HRG-hardware (which can be emulated in EightyOne).
Memopak.png
Memopak.png (146.94 Kio) Consulté 1747 fois
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

Hello friends!

Michael is about to write a bascoder for Java:

https://joyceforum.de/viewtopic.php?f=5&t=102.

You can watch and join here:

https://github.com/mhaupt/basicode/releases.

That means you can use BasiCode programs without starting any Basic nor emulator - and under different systems (Linux, Windows, MacOS ...) - and it runs faster than every other bascoder I know!

Here is a little program to test it:

Code : Tout sélectionner

1000 GOTO 20: REM XMAS2021
1010 KU=6:DIM CC(2):CC(0)=4:CC(1)=0:GOSUB 600
1015 VE=0:HO=0.5:CC(0)=6:SR$="*":GOSUB 650
1020 FOR PA=1 TO 20
1025 IF PA>16 THEN 1062
1030 FOR PB=0 TO (PA/2)
1031 VE=(PA/26):HO=((16+PB)/32):CC(0)=4 
1034 GOSUB 260:REM RND Ergebnis in RV
1035 IF RV<0.9 THEN 1041
1036 SR$="O":GOSUB 20000:CC(0)=KU:GOSUB 650:CC(0)=4
1037 GOTO 1042
1041 SR$="#":GOSUB 650
1042 VE=(PA/26):HO=((16-PB)/32):IF PB=0 THEN 1060
1043 GOSUB 260:IF RV<0.9 THEN 1050
1045 SR$="O":GOSUB 20000:CC(0)=KU:GOSUB 650:CC(0)=4
1046 GOTO 1060
1050 IF PB<>0 THEN SR$="#":GOSUB 650
1060 NEXT PB
1061 GOTO 1070
1062 VE=(PA/26):HO=(15/32):SR$="####":GOSUB 650
1070 NEXT PA
1080 VE=(21/26):HO=(8/26):CC(0)=7:SR$="Frohe Weihnachten":GOSUB 650
1090 GOSUB 210:REM Warten auf Tastendruck = <E>nde
1100 IF IN<>69 THEN GOSUB 600:GOTO 1015
1999 GOSUB 100:GOTO 950
20000 KU=KU-2*(KU=1)-2*(KU=3)-2*(KU=5)+5*(KU=7)-4*(KU=2)+5*(KU=6):RETURN
30000 REM evtl. DIM in 1010 entfernen (in manchen Bascodern bereits enthalten)
30010 REM
30020 REM 20000 ggf. anpassen, wenn logisch wahr nicht den Wert -1 hat
30030 REM
32000 REM nach einer Idee von John Kennedy fuer ZX81
32010 REM
32020 REM angepasst fuer BasiCode von Paul Veltjens JOYCE-User-AG e.V.
32030 REM
32040 REM Ergaenzungen fuer Farb-Betrieb Thomas Rademacher JOYCE-User-AG e.V.
32050 REM
any key to start new drawing, E to end
any key to start new drawing, E to end
XMAS2021.png (18.47 Kio) Consulté 1307 fois
Pièces jointes
on Amstrad CPC in MODE 0
on Amstrad CPC in MODE 0
XMASTREE.jpg (72.82 Kio) Consulté 1301 fois
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

Better late than never

Patrick Gueulle tried to get hobbyists interested in BasiCode (https://en.wikipedia.org/wiki/BASICODE) in 1984, but the time was not yet ripe.

The possibility of exchanging software with completely foreign machines was really fantastic - especially at that time - but the programmes on offer offered little appeal compared to the individual possibilities of each computer: BasiCode did not yet have high-resolution graphics and the sound was limited to CTRL+G. Also, not everyone in France spoke Dutch or English. So Patrick's calls went unheard.

But everything has moved on.

BasiCode has been capable of pixel graphics and simple music since 1986, and colours since 1991.

You no longer have to wait at ungodly hours at the radio for programmes to be broadcast; thanks to the Internet, it's as if your distant hobby friend is sitting at your own living room table. Disc drives for computers became affordable, and later even more modern storage media arrived. Oldies can be emulated on today's hardware, and DeepL helps to overcome the language barrier.

Let's take Daniel Coulom's DCMOTO. I am very enthusiastic about this emulator! A programme in text form can be read in easily and quickly via the keyboard simulation and written to the file system of the host computer faster than the fastest secretary in the world could with LIST "LPRT:(80)". That's all I need for BasiCode - and I don't have to bother with machine code for the programme transfer and no longer have to juggle with magnetic tape cassettes. All I need are a few GOSUBs in Basic that give me access to the commands, which just have different names on other machines.

BasiCode programs still doesn't offer eight-channel sound with sophisticated envelopes, millions of colour gradations or the ability to cut HD videos. But among the creations of hobbyists from many countries, there are gems that do not deserve to be forgotten.

That's why I started to write a bascoder for the Basic 1.0 of the Thomson computers. Many programmes can already be used with it, the operation is simple: the bascoder (lines 0 to 999) is loaded via the simulation of the keyboard and then the desired Basicode programme (lines from 1000) is loaded in the same way. Both together form a complete, executable programme.

For the next BasiCode programme, the previous one is deleted with DELETE 1000- (the Bascoder is still used) and the new one is read in from the .txt file or from the clipboard, that's all there is to it.

I present three (already complete) programmes here.

The first is by Patrick Gueulle, from one of the magazines from the 80s. The first routines of the Bascoder, then still version 2, also come from there.

Code : Tout sélectionner

10 COLOR 0:GOTO 1000
20 CLEAR A:GOTO 1010
100 CLS:RETURN
110 IF HO>39 OR HO<0 THEN RETURN
112 IF VE>24 OR VE<0 THEN RETURN
114 LOCATE HO,VE:RETURN
120 REM LET HO=33:PEEK 23688:LET VE=24-PEEK 23689:RETURN
200 IN$=INKEY$:RETURN
210 IN$=INKEY$
212 IF LEN(IN$)=0 THEN 210
214 RETURN
250 BEEP:RETURN
260 RV=RND(1):RETURN
270 REM FR=(PEEK 23730+256*PEEK 23731)-(PEEK 23653+256*PEEK 23654):RETURN
300 REM SR$=STR$ SR:RETURN
310 DIM SR(CT)
311 REM IF SR=INT SR AND CN>0 THEN GOTO 316
316 REM LET SR$(1 TO )="*************":RETURN
350 REM LPRINT STR$ SR;:RETURN
360 REM LPRINT:RETURN
1000 A=40:GOTO 20:REM ******* CALENDRIER ****
1010 PRINT "JOUR       ";
1020 INPUT J:PRINT J
1030 PRINT "MOIS       ";
1040 INPUT MP:PRINT MP
1050 M=MP-2
1060 PRINT "ANNEE      ";
1070 INPUT A:PRINT A:AN=A
1080 IF MP<=2 THEN M=MP+10
1090 C=INT(A/100)
1100 A=A-(100*C)
1110 IF MP<=2 THEN A=A-1
1120 X=INT(2.6*M-.199)+J+A+INT(A/4)+INT(C/4)-2*C
1130 Z=INT(X)-7*INT(X/7)
1140 GOSUB 100:PRINT:PRINT
1150 IF Z=0 THEN PRINT "DIMANCHE  ";
1160 IF Z=1 THEN PRINT "LUNDI ";
1170 IF Z=2 THEN PRINT "MARDI ";
1180 IF Z=3 THEN PRINT "MERCREDI ";
1190 IF Z=4 THEN PRINT "JEUDI ";
1200 IF Z=5 THEN PRINT "VENDREDI ";
1210 IF Z=6 THEN PRINT "SAMEDI ";
1220 PRINT J;"/";MP;"/";AN
1230 PRINT:PRINT:PRINT "AUTRE DATE: RETOUR CHARIOT"
1240 INPUT Z$:RUN
1250 REM NOS BASICODE 2
1260 COPYRIGHT 1984
1270 REM PATRICK GUEULLE
The second already has version 3 graphics routines, it draws cubes that are arranged to form an optical illusion (an "impossible figure").
OPUS5.zip
(2.88 Kio) Téléchargé 4 fois
The third contains a quite advanced (but still far from perfect) bascoder for the latest, colour version of BasiCode.
KUBGECOL.zip
(9.63 Kio) Téléchargé 6 fois
Screenshots of the programs above
Screenshots of the programs above
basicode.png (76.9 Kio) Consulté 1023 fois
There are still a few things to be worked in: the sound, the use of the printer, working with data files and some smaller things. Perhaps not everything can be realised (e.g. the use of DEFFN(x) or the blocking of the break key.

The original computers and their Basic are completely new to me, I'm sure I'll have questions - so I'm hoping for your help!

EDIT 29/2/2024: programs with corrected bascoder version 0.97
Dernière modification par ThomasR le 01 mars 2024 16:56, modifié 12 fois.
__sam__
Messages : 7923
Inscription : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: BasiCode sur Thomson ?

Message par __sam__ »

Perhaps not everything can be realised (e.g. the use of DEFFN(x) or the blocking of the break key.
If you use the Basic 128 or 512 (a.k.a Basic 2) on the newer machines: MO6, TO8, TO9, TO9+ and Olivetti Prodest PC128, the you'll have access to DEFFN.

On the TO7-70/8/9/9+ with Basic 1 you can disable the break-key, using these POKEs:

Code : Tout sélectionner

POKE &h6294,&h32:POKE &h6295,&h62:POKE &h6296,&h39
And since Basic2 allows poking strings into memory, you can simply do

Code : Tout sélectionner

POKE &h67F6,"2b9"
to poke the three bytes with a single instruction (note: the address is different with Basic 2, but the bytes are the same).

(source)
Samuel.
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

Thank You for these informations!
I think I continue working in Basic 1.0 to see how far I will get.
If some little things don't work (ATN also is missing) it will be not important for a lot of programs.

How can I access to the system clock? How to read back a character from position (x, y) of the screen? Can I place a character at another position than in the normal 8 x 8 grid? I need some details about the parameters of the PLAY command.
Musik.jpg
Musik.jpg (111.74 Kio) Consulté 947 fois
It would be useful to find manuals for the Basic and for ROM addresses ...

Maybe I try to work with Basic 2.0 later.
__sam__
Messages : 7923
Inscription : 18 sept. 2010 12:08
Localisation : Brest et parfois les Flandres

Re: BasiCode sur Thomson ?

Message par __sam__ »

How can I access to the system clock?
Unfortunately there is no such thing as a clock in Basic 1. With basic 2, there is a construct "ON INTERVAL number GOSUB line" which can be used to measure time.
How to read back a character from position (x, y) of the screen?
SCREEN(X,Y) returns the ASCII Character in position (X,Y) (0<=X<=39, 0<=Y<=24).
Can I place a character at another position than in the normal 8 x 8 grid?
Unfortunately, this is not possible without machine language (depending on the TO or MO architecture).
I need some details about the parameters of the PLAY command.
This is the "LA" note (A in english notation).
It would be useful to find manuals for the Basic and for ROM addresses ...
For the Thomson, there is hardly a need to poke the ROM or the I/Os as there is usually a Basic command that does the same in a arguingly simpler way. More other, the ROMs access is different between the MO and the TO machines.

Every v2 thomson machine (TO9/TO8/MO6) was shipped with a comprehensive user manual describing the machine and the Basic instructions. Many are written in French of course, but some are available in German. For instance you can get the manual for the Basic "auf Deutch" there: http://dcmoto.free.fr/documentation/to9 ... index.html

[EDIT] That documentation is not available yet (@Daniel : tu ne l'aurais pas sous le coude par hasard ?). You can get the French version over there: http://dcmoto.free.fr/documentation/thomson.html
Samuel.
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

Thank You very much again, Samuel! Beneath You can see that it helped me.

By the way, I don't speak French - but the wife of my son does: she comes from the north cost of France.

Here are some new programs. Some smaller problems are solved, but the bascoder is not finished yet.

newprogs.png
newprogs.png (146.53 Kio) Consulté 861 fois
From any program you can copy the lines from 1000 on and paste them into another BasiCode system. There is a bascoder at http://robhagemans.github.io/basicode/ that you can use in Your web browser. It will work faster than the Thomson.

In this place You also can find lots of other BasiCode programs. You can choose one and try it at the Thomson (via the keyboard simulation).
The sound is working now. BasiCode can handle up to ten and a half octaves - depending of the machine where it runs. The early Thomsons offer five octaves only. If playing of a music stops due to an error then try to change the usable octaves by changing the value "3" at this line:

400 OO=INT(SP/12)-3:OO$="O"+RIGHT$(STR$(OO),1)
BACHS.zip
(4.56 Kio) Téléchargé 7 fois
BasiCode doesn't allow using "RESTORE linenumber", only "RESTORE", without a line number. So be patient if you choosed the second or third music. All other datas have to be read before, too.
ELLIPSEN.zip
(2.93 Kio) Téléchargé 6 fois
You can use this program as a screen saver.
FREUNDS2.zip
(6.43 Kio) Téléchargé 6 fois
In this program the positioning of the text (in graphics mode) isn't perfect because the computer can place it in the standard 8 x 8 grid only.


EDIT 29/2/2024: programs with corrected bascoder version 0.97
Dernière modification par ThomasR le 01 mars 2024 17:01, modifié 8 fois.
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

MazezaM.zip
(3 Kio) Téléchargé 9 fois
This is a little game I found some months before.
BIORHCOL.zip
(4.61 Kio) Téléchargé 6 fois
This program shows the status of Your bio rhythms.
PEANO.zip
(2.75 Kio) Téléchargé 4 fois
Do You know "Peano" curves? Your Thomson can draw them.


EDIT 29/2/2024: programs with corrected bascoder version 0.97
Dernière modification par ThomasR le 01 mars 2024 17:04, modifié 5 fois.
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

Version 0.95 ready
Here is the latest version of the bascoder for Basic 1.0 on Thomson computers.

Code : Tout sélectionner

You can find a manual and a small teaching book here:

https://joyce.de/basicode/download/Man_BC3C.pdf  
https://joyce.de/basicode/download/BC3_KURS.zip

Translate them to English and then to French. This will give a besser result
than translating it directly from German to French.

The bascoder is working now but isn't perfect yet. I'm sure someone of you can solve the little problems
that are left better than I because these machines are completely new to me.

So let's talk about the unsolved details...

There are no ATN function and no DEF FN(x) command in Basic 1.0.
Would many programs like to use them?

GOSUB 280 enables and disables the BREAK key.
Here it only does an RETURN. Can You change this using machine code?

GOSUB 310 is similar to the PRINT USING command. My routine is a little bit slow.
It could be faster if Basic 1.0 had a STRING$ command.

GOSUB 400 plays tunes. You can change the area of used octaves
by taking another value than 3 in this line (SP means sound pitch):

	400 OO=INT(SP/12)-3:OO$="O"+RIGHT$(STR$(OO),1)

If You want to change the speed of playing the music then take
another value instead of SD*60/8 (SD means sound duration)

	401 OD$="L"+MID$((STR$(1+INT(SD*60/8))+" "),2,2):OP=SP MOD 12+1:OO$="O"+RIGHT$(STR$(OO),1)

or another value than T5:

	402 PLAY "T5 A0",OO$,OD$,MID$("  DO DO#RE RE#MI FA FA#SO SO#LA LA#SI ",3*OP,3):RETURN

SV means sound volume but the PLAY command doesn't own a parameter for the loudness.

GOSUB 450 gives a pause of the length SD: SD=1 means 1/10 sec.
If you want it more slow or more fast then change .44 in 

	450 OSD=SD*.44
and

	454 SD=INT(OSD/.44)

The GOSUBs 500 ... 580 are for using data files. NF tells which kind of storage medium
will be used. 0 and 1 are for writing and reading in the own cassette format of BasiCode.
2 and 3 are for the own cassette format of the specific machine, 4 and 5 for the disc drive
and 6 and 7 for a second disc drive or a hard disc.
I only used the Thomson cassette format, no matter which NF is given:

	510 IN=0:CLOSE OF:ON (OF MOD 2)+1 GOSUB 515,518,515,518,515,518,515,518:RETURN

Change it if You want it.

GOSUB 650 writes text in graphic mode. With Basic 1.0 I can't place it
to every pixel position, only in the usual 8 * 8 grid. Instead of erasing a letter pixel by pixel
I overwrite it with a space sign in the colour of the back ground.
Can You find another solution in machine code?
BC0_95.png
BC0_95.png (179.97 Kio) Consulté 666 fois
SLIDER2.zip
(8.58 Kio) Téléchargé 5 fois
This is a Sokoban game, but it doesn't work very fast.
ATLAS.zip
(5.87 Kio) Téléchargé 7 fois
This program is from the east german Book for BasiCode-3.

EDIT 29/2/2024: programs with corrected bascoder version 0.97
Dernière modification par ThomasR le 01 mars 2024 17:07, modifié 6 fois.
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

MEMORY.zip
(6.6 Kio) Téléchargé 5 fois
A memory game for two players.
VOLKSLIE.zip
(5.87 Kio) Téléchargé 6 fois
National anthems of some European countries.


EDIT 29/2/2024: programs with corrected bascoder version 0.97
Dernière modification par ThomasR le 01 mars 2024 17:09, modifié 5 fois.
Avatar de l’utilisateur
ThomasR
Messages : 39
Inscription : 16 janv. 2019 09:02

Re: BasiCode sur Thomson ?

Message par ThomasR »

MOZART.zip
(4.73 Kio) Téléchargé 4 fois
This program produces little music pieces in the style of Mozart. It is from the east german BasiCode-3 book, too.
FKT3D.zip
(3.5 Kio) Téléchargé 4 fois
Also from that book: functions of two variables.

Enjoy the programs and try to use other BasiCode programs that you can find in the www! You just have to combine them with the lines under 1000 of these programs - it is very easy.

I have a question to You:

Is it a problem that there are codes 0A (hex) to separate the lines? How can I change them to 0D 0A? Would it be better to attach text files instead of using these code boxes?

EDIT 29/2/2024: programs with corrected bascoder version 0.97
Dernière modification par ThomasR le 01 mars 2024 17:10, modifié 5 fois.
Répondre