jum Posted October 23, 2013 Share Posted October 23, 2013 http://kidsquid.99k.org/compilers/5200bas/5200bas.html Quote Link to comment Share on other sites More sharing options...
jum Posted October 12, 2016 Share Posted October 12, 2016 So I have finally converted the 5200BAS compiler (originally written in QuickBasic) to Python, in order to make it more portable. The python version was developed on Windows, but should run on Mac or Linux too. At this point I am waiting on feedback from the original 5200BAS author (calamari), and have only tested with DASM and one sample (need to test with TASM and some more samples). 4 Quote Link to comment Share on other sites More sharing options...
+Larry Posted October 13, 2016 Share Posted October 13, 2016 Are any of these available anywhere currently? I tried every link in this thread and got error 404 or "This domain is for sale." -Larry Quote Link to comment Share on other sites More sharing options...
Meshuggah333 Posted October 13, 2016 Share Posted October 13, 2016 I'm declaring interest on the python version, the possibility of adding other 6502/65C02 targets is appealing. 1 Quote Link to comment Share on other sites More sharing options...
ricortes Posted October 13, 2016 Share Posted October 13, 2016 Are any of these available anywhere currently? I tried every link in this thread and got error 404 or "This domain is for sale." -Larry Does any include the original? Wayback has it I think, just a little hard to find the place with the actual files. The zip down loads and extracts from here. https://web.archive.org/web/20060715054353/http://kidsquid.com/old/compilers/5200bas/5200bas.html Not sure about the other files or latest version or anything else really. I may have a copy on some old hard drives if that link doesn't work. 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted October 13, 2016 Share Posted October 13, 2016 So I have finally converted the 5200BAS compiler (originally written in QuickBasic) to Python, in order to make it more portable. The python version was developed on Windows, but should run on Mac or Linux too. At this point I am waiting on feedback from the original 5200BAS author (calamari), and have only tested with DASM and one sample (need to test with TASM and some more samples). I never bought a flash cart for the 5200 because development of this compiler was long dead. It felt like 5200BAS was still using lots of inline assembly instead of BASIC-like commands. I'd say move forward with what you have. It would be MIND BLOWING to have BASIC compilers for all the Atari video game systems: 2600, 7800, Jaguar and now 5200 =) 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted October 13, 2016 Share Posted October 13, 2016 Does any include the original? Wayback has it I think, just a little hard to find the place with the actual files. The zip down loads and extracts from here. https://web.archive.org/web/20060715054353/http://kidsquid.com/old/compilers/5200bas/5200bas.html Not sure about the other files or latest version or anything else really. I may have a copy on some old hard drives if that link doesn't work. Hi Rick- Wow! Lots of good info there. Thanks very much for the link! -Larry 1 Quote Link to comment Share on other sites More sharing options...
jum Posted October 13, 2016 Share Posted October 13, 2016 Yes thanks for the web.archive,org link ricortes - seems to have all the original files/info. I already have the 5200BAS documentation, the new Python compiler and some examples on github. But like I said just waiting for feedback from calamari. 5200BAS also seems easily modifiable to output executable or cart image for the Atari 8-bit computers too, would make building a game for both 5200 and 8-bit computer doable, would just have to sort the memory map differences. Other 6502 targets are possible, but would require some work. Also there are probably Batari basics or similar for 2600/7800/Lynx. 5200BAS does let you use inline assembly if you want, but you don't have to. It's also a pretty low-level BASIC, so generates very fast assembly output. Maybe someone who's up to date with latest DASM / TASM can advise on which versions work on Windows 7/8/10, and if they available on Linux/Mac? Quote Link to comment Share on other sites More sharing options...
Meshuggah333 Posted October 13, 2016 Share Posted October 13, 2016 Do you think the asm syntax could be modified for ca65 from the cc65 suite? As it's well supported, portable, and is very configurable in term of targets. Quote Link to comment Share on other sites More sharing options...
jum Posted October 14, 2016 Share Posted October 14, 2016 (edited) There are only very minor differences between DASM and TASM syntax, so it's easy for 5200BAS to switch between the two (using if() statements sprinkled lightly thru the code). Not sure how similar ca65 syntax is. If it is not very similar, then to support it would probably require some significant changes. Maybe someone can make a quick list of the differences between DASM and ca65 syntax. Or maybe there is an existing tool to translate from DASM/TASM to ca65. Edit: Have checked out ca65 - seems to use C-style linking and sections. 5200BAS would need some major changes to support it. Do you think the asm syntax could be modified for ca65 from the cc65 suite? As it's well supported, portable, and is very configurable in term of targets. Edited October 17, 2016 by jum Quote Link to comment Share on other sites More sharing options...
Meshuggah333 Posted October 14, 2016 Share Posted October 14, 2016 I can't wait to read your code Quote Link to comment Share on other sites More sharing options...
jum Posted October 17, 2016 Share Posted October 17, 2016 Progress update: Spent some time converting Dan Boris' DASM player-missile example ("52pm.txt") to 5200BAS, which resulted in some bug fixes in the python code, and adding some more items to the list of improvements that could be added to 5200BAS, eg: POKE $1000, $77 not possible (have to use "A=$77 : POKE $1000,A") Error messages need to be more concise. Also need to compare 5200BAS with Batari basic. Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted October 17, 2016 Share Posted October 17, 2016 Progress update: Spent some time converting Dan Boris' DASM player-missile example ("52pm.txt") to 5200BAS, which resulted in some bug fixes in the python code, and adding some more items to the list of improvements that could be added to 5200BAS, eg: POKE $1000, $77 not possible (have to use "A=$77 : POKE $1000,A") Error messages need to be more concise. Also need to compare 5200BAS with Batari basic. Awesome python conversion Jum! You may have an easier time comparing 5200BAS to vwBASIC, it's written in PowerShell and abstracts the hardware to be more similar to the a8/5200 with Display lists and scroll registers. I'm working on a port to allow vwBASIC games to be cross compiled for the 5200, but of course it simplifies games considerably. Agree Dan Boris' 52pm is excellent example code - atariarchives.org and JAC!'s WUDSN are also some good resources for indepth info! 1 Quote Link to comment Share on other sites More sharing options...
jum Posted October 31, 2016 Share Posted October 31, 2016 OK so I think the 5200BAS python conversion is at a state where it's basically useable, so if you want to grab it and mess around: https://github.com/james7780/5200BAS_python (You will need Python 3 installed on your PC). Non-exhaustive list of changes/updates (v1.97 conversion): 1. Straight conversion from QBX code to Python code 2. Combined includel.bas into the main python script 3. Modifications to strings and arrays to better suit Python lists and dictionaries 4. Descriptive variable names 5. Try reduce global variables and scope everything better 6. Most error messages updated to provide more specific info (user-friendliness) 7. Bug fixes to some small code and logic errors 8. Python script now calls DASM/TASM with the compiled asm output as input to the assembler 9. SCREEN command now supports ANTIC modes 2 to 14 (sets up display list depending on mode) 10. Added some more examples (pm.bas, joytest.bas) 11. 5200basl.py now runs the assembler (DASM) if the BASIC code compiles to asm without error. 12. Added warning output if dlist/sprites/screen/charset not on correct page/1K boundary, or in invalid address The "hello.bas" and "pm.bas" examples show how to use 5200BAS as a beginner (ie: without using POKEs or inline assembly). Other examples by 3rd parties are credited in their respective folders. I have only test-built hello.bas, pm.bas, joytest.bas and jumpong2.bas. However there are some things that can be done to make 5200BAS more user-friendly and beginner-friendly (ie: reduce need to POKE, better manage the addresses of resources etc), as I've come to realise that 5200BAS should be positioned for beginners or maybe quick prototyping of ideas. This because if you have a more advanced project, you may as well do your project in ASM and spend your time battling with ASM rather than spend your time battling with wondering why 5200BAS code is not compiling/working. Feedback greatly appreciated as always. Quote Link to comment Share on other sites More sharing options...
TheMajorHavoc Posted November 10, 2016 Share Posted November 10, 2016 Very interested in this project! Will 5200Bas be able to compile for the 8-bit computers also? Quote Link to comment Share on other sites More sharing options...
Meshuggah333 Posted November 11, 2016 Share Posted November 11, 2016 I sincerely think this could be expanded to a lot more 6502 platforms, even non Atari ones. Great work! Envoyé de mon SM-N910F en utilisant Tapatalk Quote Link to comment Share on other sites More sharing options...
jum Posted November 30, 2016 Share Posted November 30, 2016 Very interested in this project! Will 5200Bas be able to compile for the 8-bit computers also? It should be possible to allow for building an 8K image to go in "Cartridge A" memory slot (0xA000 to 0xBFFF). Would require use of alternative memory map. I will do some investigation. 1 Quote Link to comment Share on other sites More sharing options...
scuttle Posted September 16, 2023 Share Posted September 16, 2023 On 10/12/2016 at 2:33 AM, jum said: So I have finally converted the 5200BAS compiler (originally written in QuickBasic) to Python, in order to make it more portable. The python version was developed on Windows, but should run on Mac or Linux too. At this point I am waiting on feedback from the original 5200BAS author (calamari), and have only tested with DASM and one sample (need to test with TASM and some more samples). This program is awesome!!! Original is here: https://github.com/james7780/5200BAS_python which I assume works very well on Windows. I made a few modifications myself (forked here: https://github.com/scuttle130/5200BAS_python) and now it runs on MacOS! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.