Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CP/M jollity. :)
Page 2 of 2 | |||||
Author | Message | ||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Hi MIck, I started conversion to MMBasic for Pico, but it is a challenge. - the earlier basic version parsers allowed to have no " " between command and variable. - it is a GOTO nightmare (this is a good example how to NOT write programs). - I has multibranch goto's. Have to carefully check if MMBasic handles these well. - It shares same variable name for strings and integers and floats (i.e. "Z"). - It uses functions... Let's see if we can make these compatible. On the other hand, it is amazing how much compatibility there is between this 1978 basic program and 2023 MMBasic. A lot translates very well. Volhout Edited 2023-07-20 17:41 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Try Notepad++ Replace Function Replace "IF" with "IF ",Replace "IF " with "IF " Replace "FOR" with "FOR ", Replace "FOR " with "FOR " Replace "Then 1" with "Then Goto 1" .-->.. Replace "Then 9" with "Then Goto 9" etc.. There is also a Online Version on : https://makinggamesbyyear.itch.io/star-trek-1971 Edited 2023-07-20 17:53 by Martin H. 'no comment |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
I've got a lot of it running and, as you say, it's not straightforward. :) In a lot of cases I was able to isolate chunks and convert them into SUBs, which cleaned stuff up a lot. A couple more FUNCTIONs also helped (but IIRC I didn't need one of the existing ones). The variable name duplicates were seriously confusing until I realized what was happening. I *think* I found them all. :) When you consider the history of the BASIC version it's hardly surprising that it is what it is. ------ Incidentally, the RC2040 overclocks the Pico to 250MHz but makes no allowance for slower flash. That's why it won't run on a known good YD-RP2040. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Just some elbow grease. Used the build in editor, and it will show you by color if the parser understands the line. Then used MMEDIT to replace Z$ with ZZ$ and C$ with CC$, since names where used duplicate. I did not thoroughly test it, but this starts and some commands work. Make sure to switch ON CAPS-LOCK.... startrek_wip_pico.zip Have fun... P.S. THEN xxx works just as well as THEN GOTO xxx P.P.S. Amazing the multibranch GOTO works... (ON x GOTO a,b,c,d,e,f). It is on the list of thing to be removed to save place in flash according user manual. Edited 2023-07-20 18:34 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Yes, I also found that with surprise, I had already tried to replace ON GOTO with Select Case.. :-) 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
It is not all dandy.... Try NAV to direction 1 with warp speed 4. You get an array index error in a line that does not do anything with arrays. Work continues... Volhout EDIT: it is stack related. Apparently "IF x THEN linenum" performs the same as "IF x THEN GOTO linennum" but operates different on stack. As if in first case it is treated as a SUB, and requires a END SUB. So I will have to replace all the THEN linennum with THEN GOTO linennum. EDIT: it is dirty hacked, but the program runs in picomite super_startrek_pico.zip Enjoy..... Edited 2023-07-20 22:26 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
I'm just attempting to get Zork onto the thingy using Grant Searle's packager and DOWNLOAD.COM. We'll see how it goes (it's not fast!). Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Rickard5 Guru Joined: 31/03/2022 Location: United StatesPosts: 463 |
if you did a PCB, I'd be your Punter, I'd order some and build one, Just as a Lark :) only thing is Got to figure out how to get software moved over so I can run Visi Calc on it :) I may be Vulgar, but , while I'm poor, I'm Industrious, Honest, and trustworthy! I Know my Place |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
Moving software onto a standard RC2014 (or a RC2040) isn't easy. There seem to be a couple of problems. The relatively small, fixed 64K RAM (you can't fit a RC2014 RAM expansion card to a Pico!) and the configuration of the serial ports. The problem I'm having seems to be the latter. The baud rate appears to be fixed at 115200 baud and the same port is shared between the console and data transfer. I think the console might be getting priority. I'm hoping that I can find a version of XMODEM but that also has problems as the RC2014 end has a fixed buffer that's too small for a full XMODEM packet. It probably needs hardware handshaking, which I can't do over a Pico COM port. The real RC2014 is using a Z80 SIO/2 chip so it would work on that. The PCB is no problem - it's the easy bit for me. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
Based on the RP2040 circuit. Facilities identical except: PCB can accept either surface mount or through hole Pico. For resistors you can use through-hole, or there are size R1206 pads for SMD. 5V supply fron USB-C (VSYS - original used VBUS) or serial terminal (via a diode). The latter supply can be disconnected via a blob link. GPIO connector extended to include GP8 (BUT) and GP9 (DUMP) so that these will be accessible for PS/2 keyboard if a PicoMite is fitted. The serial terminal pins have been rearranged. If you fit a female socket then a CH340 can be plugged straight in. microSD card socket changed to standard SD for easier soldering. The board has been designed to take the usual 9-pin Hirose socket (from RS) or a cheaper 11-pin Chinese one from ebay, but the latter has not been verified yet. Supply filter added for SDcard. Capacitor added on reet button. Red LED added for DSK (via TP5). If this is fitted it replaces the green one on the Pico. GP14/GP15 were allocated to a PC speaker. Added 100R resistors in series with each to protect the Pico's outputs. Audio socket now expanded to same connections as tiny RTC module,(for a PicoMite) using GP14/GP15 as I2C. 3V3 has to be enabled via a solder blob for safety. 100R resistors can be linked out via solder blobs and pullups added for I2C. Has a large, friendly pineapple on the back. (Because I can. :) ) One of the main reasons for these mods is to make the PCB multi-purpose. If you install a standard PicoMite it can be used as a stand-alone module with SD card, 11 GPIO (incluuding the ADC ports), serial terminal, RTC and four GP pins that can be used as links or IO. PCB is 90mm x 48mm so it's reasonably compact.Because of the arrangement it would probably be very easy to make a couple of stacking PCBs, one with VGA (all the signals are on the GPIO connector) and the other with IO expansion via I2C and, possibly, a second PicoMite.. RC2040 Gerber.zip Edited 2023-07-23 00:24 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Ordered--if for no other reason than that they're practically free: $2 for 5 from JLCPCB, $1.44 for shipping to Canada; $.50 for Paypal--less than 80 cents a board. (Thanks, Mick. I put in a lot of time with CP/M starting with my assembled-from-S100-boards system in 1979--though I'm not really sure it's an experience I want to revisit.) PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
################################################### # # ####### ABANDON HOPE ALL YE WHO ENTER HERE ######## # # ################################################### This stuff isn't for newbies. There are few manuals and those that do exist may or may not apply to your system! CPM Disk Manager is powerful and can (apparently) edit your disk file (which is invisible to windows). However there is no help file, instructions or manual and it will happily make your SD card unreadable by Windows. DOWNLOAD.COM has problems. PCPUT and PCGET, which use XMODEM have problems too. Eventually I *might* be able to get Zork onto the thing but don't hold your breath! Stick with the programs that it comes with and you are ok. Check out drives A: C: and D: I don't think there's anything after that unless you use a 128GB card rather than a 64GB one, in which case I think H: has something on it. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
I found Zork 1 and, apparently, HHGTTG - they are on drive I:, which I shouldn't have as this is only a 64GB SD card. I can also see them in CP/M disk manager and can move them to a different drive. How you manage to save the disks file after I've no idea so they don't actually move! Save does something but I don't know what. Save Disk brings up an error. No manual or instructions, of course. :) For some reason or other Windows can see the SD card again. Huh? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Page 2 of 2 |
Print this page |