Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Could you add the ability to import a Basic file written in pure ASCII mode? #1

Open
fmaida opened this issue Oct 25, 2023 · 3 comments
Labels
2.0 enhancement New feature or request

Comments

@fmaida
Copy link

fmaida commented Oct 25, 2023

Could you add the ability to import a MSX Basic file written in pure ASCII mode?

I'd like to be able to do something like this:

printf "10 PRINT \"HELLO WORLD\"\r\n20 GOTO 10" > file.asc
basbinizer file.asc -r file.rom

Many thanks

@Colpocorto
Copy link
Owner

It is possible, but definitely not a trivial task, since it basically requires reimplementing the whole MSX-BASIC interpreter.

It will be considered for future versions.

As for now, the best workaround is to load the .ASC file on any MSX Machine, and save it as a tokenized file (SAVE"PROG.BAS" without the ",A" option). The resulting .BAS prog could be easily converted to .ROM with Basbinizer.

@Colpocorto Colpocorto added the enhancement New feature or request label Oct 25, 2023
@fmaida
Copy link
Author

fmaida commented Oct 25, 2023

It is possible, but definitely not a trivial task, since it basically requires reimplementing the whole MSX-BASIC interpreter.

It will be considered for future versions.

As for now, the best workaround is to load the .ASC file on any MSX Machine, and save it as a tokenized file (SAVE"PROG.BAS" without the ",A" option). The resulting .BAS prog could be easily converted to .ROM with Basbinizer.

I understand. At the moment I'm using your program in chain with https://github.com/farique1/basic-dignified to obtain the required result:

printf "{mainloop}\r\n\tPRINT \"HELLO WORLD\"\r\n\tGOTO {mainloop}" > input.bad
python badig.py input.bad output.bmx --tk_tokenize
basbinizer output.bmx -r output.rom

In this way, I can write a MSX Basic program on my modern computer without having to use line numbers (they can be replaced by labels). Then your program puts it into a ROM file. It's quite handy IMHO

@Colpocorto
Copy link
Owner

Wow, didn't know about basic-dignified. It looks very nice.
It's great you can use both programs in your pipeline simulntaneously. Open source software at its best!

Until I decided whether I add this feature in future versions or not, I will add to the README.md file some instructions recommending your approach.

@Colpocorto Colpocorto added the 2.0 label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants