Page 2 of 4
Re: Salora Manager / Laser 2001 BASIC
Posted: Mon Mar 13, 2023 6:54 pm
by @username@
USR
The USR function is also still there as a token (213).
All it does is jump to ZP $0A.
As in AppleSoft BASIC, the JMP vector defaults to the ILLEGAL QUANTITY ERROR text.
Salora BASIC would be
then replace the SGN token with 213 ($D5)
The difference between the CALL and USR functions is that USR can pass a value to the procedure using a 4byte FLOAT and it has a fixed address.
Before calling ZP locations 11 and 12 should be updated to the address (little endian) of your ASM routine.
When RUN, BASIC places the value contained in brackets after the USR call as a FLOAT at $9D. If the function does not need to return a value, just return. However, if a value should be returned and placed in A, place the new FLOAT value at $9D and return.
This example places a short ASM routine at $6000, which returns 4 as a float.
Code: Select all
10 GOSUB 1000
20 A=SGN(100)
30 PRINT A
40 END
1000 POKE 11,0 : POKE 12,96
1010 FOR X=0 TO 12
1020 READ B : POKE24576 + X,B
1030 NEXT X
1040 RETURN
1050 DATA 169,131,133,157,169,0,133,158,133,159,133,160,60
The DATA statement contains
LDA #$83
STA $9D
LDA #0
STA $9E
STA $9F
STA $A0
RTS
Re: Salora Manager / Laser 2001 BASIC
Posted: Tue Mar 14, 2023 1:47 am
by Mobsie
That’s really Amazing
Re: Salora Manager / Laser 2001 BASIC
Posted: Tue Mar 14, 2023 6:22 pm
by @username@
Put the
JOY back in Salora BASIC just needs a little bit of ASM to keep the BASIC engine happy.
Code: Select all
10 FOR X = 0 TO 77
20 READ B
30 POKE 17408 + X,B
40 NEXT X
50 CALL 17408
60 PRINT PEEK (208)
70 GOTO 50
1000 DATA 72,138,72,162,3,169,0,149
1010 DATA 208,202,16,251,162,31,181,0
1020 DATA 157,192,3,202,16,248,169,0
1030 DATA 141,1,16,32,5,250,165,17
1040 DATA 240,7,41,15,74,170,232,134
1050 DATA 208,165,19,240,7,41,15,74
1060 DATA 170,232,134,209,165,22,41,3
1070 DATA 133,210,165,23,41,3,133,211
1080 DATA 162,31,189,192,3,149,0,202
1090 DATA 16,248,104,170,104,96
This loads the routine to $4400.
Line 50 reads the joy ports to 208,209,210 and 211. These are JOY0DIR, JOY1DIR, JOY0FIRE and JOY1FIRE.
Directions and values are the same as CV BASIC, so directions 1 to 7, fire buttons 1,2,3.
Re: Salora Manager / Laser 2001 BASIC
Posted: Wed Mar 15, 2023 5:23 pm
by @username@
Attached is the Salora Manager ROM and token name listing amendment.
This is to enable using the functions which are in the BASIC rom within an emulator.
I have removed the redundant MUSIC and FLASH token names, as they do nothing, and added POP, DEF, FN and USR.
Re: Salora Manager / Laser 2001 BASIC
Posted: Wed Mar 15, 2023 7:06 pm
by Mobsie
Is possible to change the original rom in an Salora then? For sure there are not socket.
The Laser 2001 rom is different as i remember yes?
Re: Salora Manager / Laser 2001 BASIC
Posted: Wed Mar 15, 2023 7:31 pm
by @username@
The Salora Manager and Laser 2001 roms only differ in version number, keyboard mapping table for funky characters and tape timings.
Otherwise they are identical, and you can apply the tokens.s patch at offset $19F over the existing token name table.
If you were going to change a real machine, I would try to come up with some switch thing to retain the original.
The original ROM can run the tokenised versions from the emu - they just can't display the names when listed.
Tom would be your best port of call to brainstorm the switchable ROM thing if you take that route.
I still find it really strange that Graphics Mode 1 was completely ignored, accept for creatiVision emulation.
Re: Salora Manager / Laser 2001 BASIC
Posted: Wed Mar 15, 2023 7:48 pm
by Scouter3d
Hi, changing / switching the ROMs (yes, there are 2 of them High and Low) in a Laser or Manager is no easy task... They are soldered in and shielded with two heavily soldered metalshields... also one would need to desolder the RAM-board... They really are the repairmans-nightmare :0)
Other than that switching would be easy, like all other Eproms are swichtched, like in the Megacart for example (switch and a resistor)
Sadly they also cannot use an external ROM (at least not from the cartport) as they miss the needed signals there...
and over the expansionport one has to replace the CPU as well as the ROM... (like in the colecovision adaptor)
Cheers, TOM:0)
Re: Salora Manager / Laser 2001 BASIC
Posted: Wed Mar 15, 2023 7:58 pm
by Scouter3d
Owning a Salora Manger again (Thanks to @username@, you are the best!)
I had to type in a small test-proggie :0)
Again it is a small mandelbrot fractal... This time in Text mode (yes it can only use 2 colors at a time)
It takes about 4min to complete (and using @username@s speedup only 3min)
PS: It really has been a while: Is there a way to copy / paste BASIC programs into the emulator to save them for the real deal? Can´t remember...
Cheers, TOM:0)
Code: Select all
10 FOR Y=-12 TO 11
20 FOR X=-24 TO 11
30 CA=X*.0458
40 CB= Y*.08333
50 A=CA
60 B=CB
70 FOR I=0 TO 15
80 T=A*A-B*B+CA
90 B=2*A*B+CB
100 A=T
110 IF (A*A+B*B)>4 THEN GOTO 200
120 NEXT I
130 PRINT " ";
140 GOTO 210
200 IF I>9 THEN I=I+7
205 PRINT CHR$(48+I);
210 NEXT X
220 PRINT
230 NEXT Y
240 GOTO 240
Re: Salora Manager / Laser 2001 BASIC
Posted: Wed Mar 15, 2023 8:11 pm
by Mobsie
That’s wow
Re: Salora Manager / Laser 2001 BASIC
Posted: Sat Mar 18, 2023 5:10 pm
by @username@
VPOKE is broken in the dumps we have.
Indeed there's some confusion in the tape and type in BASIC listings too.
This the VPOKE and common SETVDPADDR functions.
Code: Select all
**************************************************************
* VPOKE *
**************************************************************
f220 20 74 d8 JSR FUN_d874 ;; Get arguments
f223 8a TXA
f224 48 PHA
f225 a6 51 LDX DAT_0051
f227 a5 50 LDA DAT_0050
f229 20 6f e9 JSR SETVDPADDR
f22c 68 PLA
f22d 20 63 e9 JSR WRITEVDP
f230 60 RTS
**************************************************************
* FUNCTION *
**************************************************************
undefined SETVDPADDR(void)
undefined A:1 <RETURN>
SETVDPADDR XREF[17]: e32e(c), FUN_e4a6:e4bd(c),
e981(c), e995(c), e9ae(c),
FUN_e9c7:e9e4(c),
FUN_e9c7:ea28(c), TEXT:ea45(c),
TEXT:ea59(c), FUN_ea76:ea7a(c),
eaba(c), FUN_ec93:eca7(c),
FUN_ec93:ecb9(c),
FUN_ec93:eced(c),
FUN_ecfb:ed09(c), f229(c),
f241(c)
e96f 08 PHP
e970 78 SEI
e971 20 67 e9 JSR WRITEVDPCTL undefined WRITEVDPCTL(void)
e974 8a TXA
e975 49 80 EOR #0x80
e977 20 67 e9 JSR WRITEVDPCTL undefined WRITEVDPCTL(void)
e97a 28 PLP
e97b 60 RTS
The problem is caused by the EOR #$80 - which inverts the MSB.
Pipeline tries to fix this by adding 32768 to any VPOKE values.
However the VDP write latch is not set with #$40.
The Kaarma program does nothing - which really doesn't help as the VDP has the registers flipped on and off!!
To get VPOKE to work with the ROM dumps you need to add 49152 (#$C000) to effectively set the write latch and allow the flip to clear the MSB.