It is currently Wed Oct 18, 2017 11:41 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jan 26, 2017 1:37 pm 
Offline

Joined: Sun Mar 21, 2010 3:07 pm
Posts: 4
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! :)


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 1:25 pm 
Offline

Joined: Tue Jul 12, 2011 10:58 am
Posts: 263
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


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 10:40 am 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 211
Location: Central Illinois, USA
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


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.

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group