So, after rewriting it twice (!) I finally got the HTTP download working reliably. It's fairly simple ; it just downloads a file from a URL and stores it in SPIFFS on an ESP32. This can be done programatically.
Another issue, again specific with the ESP32 is transmission the other way. I don't know if anyone will ever actually write any code on the machine itself for real, as opposed to cross development, but if so a form of backup is required.
I've added (another) hack which allows data to be sent back via the serial debugging port. A BASIC program reads the directory and then sends the data back through that port in a text format, a bit like Intel's Hex format, which can be captured and converted back to the actual files.
I've also decided that SYS should be redesigned. At present it just passes the address of variable A in R0 (as well as the RPL stack pointer in R8). I found that accessing routines using RPL is messy - it works fine RPL(#file$ 7 2 &10 sys ^size) but it's not that clear. and I'd like to be able to do SYS &10,7,@file$ . I haven't written any code that uses the A passing and RPL makes it a moot point anyway. ($0010 is the File handler vector). The idea being that &10 is the call address, R0 = 7, R1 = address of file$. The RPL does the same thing (the 2 is a parameter count).
Though there will have to be two forms of SYS, because it quite often returns a value in R0. So there'll be a Unary call =SYS(&10,7,@file$) which uses the same code.
Monday, 27 April 2020
Subscribe to:
Post Comments (Atom)
Breaking change
We all make mistakes. One early mistake I made was copying (partly) the old thing in Microsoft BASIC where you didn't have to declare ...
-
I'm quite surprised. I actually am finding doing this rather, well, boring. It's a bit like manually translating a foreign langu...
-
This game is not slightly based on "Sabre Wulf" So this is coming along okay though I haven't done a huge amount on it yet...
-
So the completely original arcade adventure is now working except for sound effects. I think the next thing I'll do is this sort of ...
No comments:
Post a Comment