On 5/17/2022 at 2:39 AM, TomXP411 said:
It's theoretically possible - you can write a game cartridge that acts like a text UI, load a machine monitor and maybe even a BASIC interpreter on it. That's just all software. The only hard part would be getting keyboard input. You'd either have to put some sort of PIO chip, use the expansion connector (on an NES that has one), or hack a keyboard into one of the controller ports (probably with an Arduino.)
I've also thought of doing this, but it would be pretty low resolution and probably look like a VIC-20 in terms of text size.
I'm not sure what the BASIC interpreter would be for - I don't know of any NES games that run on a layer of BASIC. Then again, I suppose there are cases where you could use BASIC as a tool to create resources (sprites, music?) for the eventual ML code to access.
Having an ML interpreter right on an NES reminds me of using my PE6502 kit computer. It boots into WozMon, which is sort of a bare-minimum OS, but also has an ML assembler onboard called Krusader (
link to the manual). Sine the 2A03 is 6502-based it may be possible to get Krusader onto our hypothetical keyboard-enabled NES.
Development in 6502 assembly on a 6502 for that same 6502 is, in my opinion, a fun challenge. You need memory space for the source code, for the assembled version of the code, for any data the assembled version draws on (strings, etc.) and for Krusader itself, all in a single 64k address space; and it's up to the programmer to manage all that manually. Working on the PE6502, I found myself coding low-level utilities that let me do simple things like "create a new string and save it at a given memory address". Once that tool was tested and working, I could delete the source code for it to free up space but continue to use the assembled tool as I continued to work on the project.
These additional constraints are not ideal, but that's kind of the point of taking on the challenge of developing on-system. And yes, we could get around the space constraints with RAM expansions (on our hypothetical NES, not on the PE6502). I'm not sure what
@Cyber is up to, but good luck! It sounds like fun!