... in fact, an hybrid between compiler and interpreter, as the source code would be converted to a easily parseable bytecode, complete with tokenized commands, reverse polish notation for expressions, jump tables, etc. by a "compiler" running on the PC which would output a working NES ROM containing the bytecode interpreter plus the program and assets. A simple and easy to produce UNROM 64K would work nice, with the fixed page for the interpreter, one page to contain graphics, and two for the program itself. Expanding to UNROM 128K or any kind of oversize would be trivial.
Still not sure how to manage data which is external to the program. Probably will turn DATA blocks to const data, or something like that.
Apart from the basic BASIC stuff (loops, selective instructions, etc) and basic IO (PRINT / INPUT / joypad read) I was planning on adding a simple and easy layer of assets such as metasprites, metatiles, a background of metatiles, functions to define actors and bounding boxes, simple collision detection... you name it.
The idea is in my mind since I read about the original Hudson Soft BASIC for the NES which may be cumbersome to use as it requires a not very common peripheral, plus you can't really sell carts of your games because they would contain copyrighted code. My main goal would be providing something simmilar but allowing people to actually produce their games in carts and sell them (still have to decide which kind of licensing I would like to apply), plus allowing to work on PC.
Maybe just replicating the existing BASIC interpreter would be a nice start, but I don't really know its inner workings other that it doesn't let you use your own graphics, which is something I don't like.
I just wanted to know what you guys think about this project and if you have any comments about the kind of BASIC dialect or the features it should support.
Thanks.
Still not sure how to manage data which is external to the program. Probably will turn DATA blocks to const data, or something like that.
Apart from the basic BASIC stuff (loops, selective instructions, etc) and basic IO (PRINT / INPUT / joypad read) I was planning on adding a simple and easy layer of assets such as metasprites, metatiles, a background of metatiles, functions to define actors and bounding boxes, simple collision detection... you name it.
The idea is in my mind since I read about the original Hudson Soft BASIC for the NES which may be cumbersome to use as it requires a not very common peripheral, plus you can't really sell carts of your games because they would contain copyrighted code. My main goal would be providing something simmilar but allowing people to actually produce their games in carts and sell them (still have to decide which kind of licensing I would like to apply), plus allowing to work on PC.
Maybe just replicating the existing BASIC interpreter would be a nice start, but I don't really know its inner workings other that it doesn't let you use your own graphics, which is something I don't like.
I just wanted to know what you guys think about this project and if you have any comments about the kind of BASIC dialect or the features it should support.
Thanks.