Not sure to put this in Programming or Hardware, so putting it here by default...
I've more or less completed my investigations into the W65C134-SXB board which I posted about here:
viewtopic.php?f=4&t=7809#p104005I blew the dust off it for a couple of reasons - one was to see how well I could port my GIBL TinyBasic to something else and another reason concerns a new project I am going to start over the solstice period (more on that at a later date).
And as these things do, it's sort of grown... the SXB board has 128KB of Flash/EEPROM which can be re-programmed in-situ (Although the re-programming program must run from RAM) so I set about making a modified version of my TinyBasic that could let me re-program bits of the EEPROM as I needed. I also decided that I needed to throw away the on-board 4K monitor program and write my own - it uses far too much Zero Page (of which 64 bytes are already consumed by hardware mapping) and has features I just don't want, so working out how to replace that was another challenge, but the upshot is that I can power on the board, go directly into my TinyBasic and have that auto-load and run a program from the EEPROM (if needed). It does all this in the usual few milliseconds that our computers of old did..
I added some features into GIBL for the board - an LED command to read and write the 4 on-board LEDs as well as Save, Load, Chain and directory commands to save files in the EEPROM and get a listing of what's in it. It's not a filing system, but variable sized buckets (4, 8 or 16KB) to store programs in and if your program has a line zero with a REM statement in it, then that's what's printed out by the DIR command although file names are simple numbers from 0 to 15.
Chaining programs loads and runs the given program but keeps variables in-tact.
And with all that I've managed to keep the size to just under 4KB. Just. (currently about 100 bytes spare) There is more code in the "monitor" section for serial IO and a 100Hz ticker though.
You can use the byte and word indirection (peek/poke) commands to read/write the 100Hz timer and play with the spare IO ports - there is an 8-bit IO port, 7 bits of another port free and one bit in a 3rd port you can use.. And as with those old micros back then, nothing will stop you poking the wrong value in the wrong place and crashing the system. (I don't think there is a HCF feature though!)
It could make the 134-SXB board into an almost usable microcontroller platform which you can program in TinyBasic although it lacks the speed and richness of hardware facilities of a modern µC like I2C, SPI, Analog and so on but the full CPU bus is available if you wanted to add in extra memory mapped hardware...
I'll tidy it all up over the weekend and make another release with ready-to-go binaries (well SREC) files if anyone wants to load it directly into their 134-SXB board - I did have a couple of people express interest over on a Facebook group, so if you have one and want to blow the dust off, then...
Code:
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on May 6 2018, 08:02:47.
Port /dev/ttyUSB0, 18:25:17
Press CTRL-A Z for help on special keys
� <---- I pushed the reset button at this point <----
W65C134-SXB: 32K
Gordons Interactive BASIC Language: r04
Hello, Gordon. Welcome to GIBL!
cSecs to Boot: 1
>LIST
0 REM!BOOT
1 C=?&4B
10 PR "Hello, Gordon. Welcome to GIBL!"
15 PR "cSecs to Boot: ", C
20 END
>DIR
0: 4K: Test in Slot 0
1: 4K: GIBL Mandelbrot
2: 4K: Chain Test
3: 4K:
4: 4K:
5: 4K:
6: 4K:
7: 4K: Chain Test 2
8: 8K: Calculate Pi
9: 8K:
10: 8K:
11: 8K:
12:16K:
13:16K:
14:16K:
15: 4K: BOOT
>CH 0
Hello, world!
>LIST
0 REM Test in Slot 0
10 PRINT "Hello, world!"
20 END
>CH 1
Mandelbrot - Gordons TinyBasic - Integers
Start
......,,,,,,,,,,,,,,,,,,,,,,'''''''''~~~~~=+:*$O:;==~~'''''',,,,,,,,,,,........
.......,,,,,,,,,,,,,,,,,,,,,'''''''''~~~==+%*O ;;%=~~~~''''',,,,,,,,,.........
........,,,,,,,,,,,,,,,,''''''''~~~'====++: %++=~~~~'',,,,,,,,,..........
........,,,,,,,,,,,',,,,'''''''~~~=++::+;;* %;:++===='''',,,,,,..........
.....,,,,,,,,,,,,''''''''~~~~~~~==+; &$% ;*;$+=~',,,,,,,,,,.......
...,,,,,,,,,,,''''''''''~~~~~~===::; +~'''',,,,,,,,,.....
....,,,,,,,,,,,'''~~~=========+++& %:==~~''',,,,,,,......
.....,,,,,,''''''~~=+X::+; :+++:;% &&=~~''',,,,,,,......
....,,''''''''~~~~=+:% *O B*;*% $=~~'',,,,,,,,......
,,,,,,''''''~~~~~=++;*X B =~~''',,,,,,,,,,,,.
,,,,,'''~~~~=====;*%& +=~~'',,,,,,,,,,,,,.
,,,,''~~==++++:+*& O:=~~'''''',,,,,,,,,,.
,,,,' %;+==~~'''',,,,,,,,,,,.
,,,,''~~==++++:+*& O:=~~'''''',,,,,,,,,,.
,,,,,'''~~~~=====;*%& +=~~'',,,,,,,,,,,,,.
,,,,,,''''''~~~~~=++;*X B =~~''',,,,,,,,,,,,.
....,,''''''''~~~~=+:% *O B*;*% $=~~'',,,,,,,,......
.....,,,,,,''''''~~=+X::+; :+++:;% &&=~~''',,,,,,,......
....,,,,,,,,,,,'''~~~=========+++& %:==~~''',,,,,,,......
...,,,,,,,,,,,''''''''''~~~~~~===::; +~'''',,,,,,,,,.....
.....,,,,,,,,,,,,''''''''~~~~~~~==+; &$% ;*;$+=~',,,,,,,,,,.......
........,,,,,,,,,,,',,,,'''''''~~~=++::+;;* %;:++===='''',,,,,,..........
........,,,,,,,,,,,,,,,,''''''''~~~'====++: %++=~~~~'',,,,,,,,,..........
.......,,,,,,,,,,,,,,,,,,,,,'''''''''~~~==+%*O ;;%=~~~~''''',,,,,,,,,.........
......,,,,,,,,,,,,,,,,,,,,,,'''''''''~~~~~=+:*$O:;==~~'''''',,,,,,,,,,,........
Finished
Time: 344 secs.
>LIST
0 REM GIBL Mandelbrot
100 VDU12:PRINT "Mandelbrot - Gordons TinyBasic - Integers"
110 PRINT "Start"
120 !&4C=0:REM Initialise TIME
130 Z=TOP:$Z=".,'~=+:;*%&$OXB#@ "
140 F=50
150 FOR Y = -12 TO 12
160 FOR X = -49 TO 29
170 C=X*229/100
180 D=Y*416/100
190 A=C:B=D:I=0
200 Q=B/F:S=B-(Q*F)
210 T=((A*A)-(B*B))/F+C
220 B=2*((A*Q)+(A*S/F))+D
230 A=T: P=A/F:Q=B/F
240 IF ((P*P)+(Q*Q))>=5 GOTO 280
250 I=I+1:IF I<16 GOTO 200
260 PRINT" ";
270 GOTO 290
280 VDU ?(Z+I)
290 NEXT X
300 PRINT ""
310 NEXT Y
320 Q=!&4C
330 PRINT"Finished"
340 PRINT"Time: ",Q, " secs."
344 seconds - it's a lot slower than my 16MHz Ruby board (currently 77 seconds)... But if I scale that 77 by 16/3.6884 then it's pretty close.
Cheers,
-Gordon