since years ago i were trying to extend Boriel’s ZX-Basic Compiler ( http://www.boriel.com/wiki/en/index.php/ZX_BASIC ) to most of existing Z80-based hardware ( http://www.boriel.com/wiki/en/index.php ... R_HARDWARE )
and since Boriel’s ZX-Basic Compiler is coded in Python (relatively simple to analyze, adapt, and start using without compiling), and quite simple to use, i imagined how simple it would be to adapt it to use 6502 instead of Z80, replacing all the Z80 routines to their 6502 equivalence - it uses ix register and stack quite intensively on routines, allows inline assembly and libraries, calculations with float points, 8, 16 and 32 bit variables ( http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Types ) , and the code is released in a gpl-compatible software-libre licensing
how simple it would be? and how soon could we expect such fork being released to the public?
(i think it is worth seeing how it works, at least...)
thanks in advance!
what about forking Boriel’s ZX-Basic Compiler for 6502/NES?
Moderator: Moderators
-
- Posts: 11
- Joined: Sun Mar 21, 2010 3:07 pm
Re: what about forking Boriel’s ZX-Basic Compiler for 6502/N
Not many people are fans of BASIC here. Your best bet is to get into contact with people who have tried to get high level / beginner friendly compilers going.
Here's Atalan. I'd look at the source and examples for NES:
http://atalan.kutululu.org/
Here's PyNES:
https://gutomaia.net/pyNES/
Another option is to take an approach similar to rebootBASIC for the Atari Jaguar. Something like: use BCX to convert BASIC to C then tweak the output into something cc65 will like.
http://bcx-basic.sourceforge.net/
http://shiru.untergrund.net/articles/pr ... s_in_c.htm
Yet another option is to study the source code for batari BASIC. It works by using canned graphic engines in conjunction with converting BASIC into 6502 assembly:
http://bataribasic.com/download.html
Here's Atalan. I'd look at the source and examples for NES:
http://atalan.kutululu.org/
Here's PyNES:
https://gutomaia.net/pyNES/
Another option is to take an approach similar to rebootBASIC for the Atari Jaguar. Something like: use BCX to convert BASIC to C then tweak the output into something cc65 will like.
http://bcx-basic.sourceforge.net/
http://shiru.untergrund.net/articles/pr ... s_in_c.htm
Yet another option is to study the source code for batari BASIC. It works by using canned graphic engines in conjunction with converting BASIC into 6502 assembly:
http://bataribasic.com/download.html
Re: what about forking Boriel’s ZX-Basic Compiler for 6502/N
That's what I came to say. A lot of people have success with that in Atari development. With the canned display kernels, it's not fully flexible, but also avoids having to worry about timing-critical code. I could see something like that working well for nes -- you provide standard libraries for handing nametable updates, etc, and let basic handle the simple parts of game logic.slobu wrote: Yet another option is to study the source code for batari BASIC. It works by using canned graphic engines in conjunction with converting BASIC into 6502 assembly:
http://bataribasic.com/download.html
My games: http://www.bitethechili.com