It is currently Wed Sep 20, 2017 12:38 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sat Jun 03, 2017 11:20 am 
Offline

Joined: Mon Apr 07, 2008 6:08 pm
Posts: 322
Location: Missouri
Some years ago I proposed a high-level, compiled language for 6502 dubbed "Noism."
viewtopic.php?f=2&t=9143 (the spec in the op is outdated)

Now I've finally turned it from No Man's Ism (was that joke worth the wait) into a working (but not finished) product. And with a sample BCD calculator program to show it off. All the working syntax is in the demo file. Requires Python (2.7) and ca65. (also check the readme).

Please post here or PM if you get a Python error or faulty asm and include the Noism file. Haven't tested on Python 3.0.


Attachments:
noism_alpha.zip [63.87 KiB]
Downloaded 52 times
Top
 Profile  
 
PostPosted: Mon Jun 05, 2017 5:40 am 
Offline

Joined: Tue Jul 12, 2011 10:58 am
Posts: 263
Very much excited to use a higher level language for NES dev. Hopefully my ignorant, confused questions will provide some useful feedback.

I installed Python 2.7.12 (32-bit) https://www.python.org/downloads/release/python-2712/
I installed cc65 http://cc65.github.io/cc65/
I added C:\Python27 to the PATH
I unzipped the noism files into a new folder called C:\noism

Tried to build bcdcalc.noi with this result:

Code:
C:\noism>build bcdcalc.noi

C:\noism>set ARF=C:\noism

C:\noism>echo C:\noism
C:\noism

C:\noism>call python noism.pyc bcdcalc.noi.noi
Traceback (most recent call last):
  File "noism.py", line 265, in <module>
  File "noism.py", line 55, in main
  File "C:\Users\homedrew\Desktop\bkup\self\noism3\compile.py", line 43, in __init__
IOError: [Errno 2] No such file or directory: 'bcdcalc.noi.noi'

C:\noism>cd ../cc65/bin

C:\cc65\bin>call ca65 --cpu 6502 -I C:\noism C:\noism/bcdcalc.noi.asm -o C:\noism/bcdcalc.noi.o
Fatal error: Cannot open input file `C:\noism/bcdcalc.noi.asm': No such file or directory

C:\cc65\bin>call ld65 -C C:\noism/config.cfg --obj-path C:\noism -o C:\noism/bcdcalc.noi.nes C:\noism/bcdcalc.noi.o
ld65: Error: Input file `C:\noism/bcdcalc.noi.o' not found

C:\cc65\bin>cd C:\noism
C:\noism>


Definetly interested in a Windows executable. Cobbling together the requirements (ca65 or cc65? Python versions, etc..) may also be a hiccup for novices.


Top
 Profile  
 
PostPosted: Mon Jun 05, 2017 5:55 am 
Offline

Joined: Mon Apr 07, 2008 6:08 pm
Posts: 322
Location: Missouri
Forgot to mention:

build bcdcalc

The build file appends the .noi extension.


Top
 Profile  
 
PostPosted: Mon Jun 05, 2017 6:02 am 
Offline

Joined: Tue Jul 12, 2011 10:58 am
Posts: 263
Argh! Thanks for the second pair of eyes. I let autocomplete botch things (even though I read through the build.bat file)

Ran resulting bcdcalc.nes in FCEUX without issue.


Top
 Profile  
 
PostPosted: Mon Jun 05, 2017 9:22 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 102
Location: Rio de Janeiro - Brazil
Your batch wasn't working for me, so I reduced it for testing. I copied the ca65.exe and ld65.exe to the same folder and made the batch like this:
Code:
PATH=C:\Python27
python noism.pyc test.noi
ca65 --cpu 6502 -i test.asm -o test.o
ld65 --obj test.o -o test.nes -C config.cfg

pause

After reducing everything to the max and it still not working I started doing random tests, until I found out that the "no input files" error was because of the -I. When I made it -i it compiled the nes rom.

By the way, you don't need to use the "call" command. That is only needed for when executing other batch files from within a batch file.

Is there a recommended text editor with syntax highlighting that is compatible with noism?

_________________
http://nesrocks.com/blog/superpitfall30th/


Top
 Profile  
 
PostPosted: Mon Jun 05, 2017 1:22 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18986
Location: NE Indiana, USA (NTSC)
Why .pyc and not .py? I don't know how to make a patch against a .pyc.

And why "distributed free of charge for non-commercial purposes"? What do you consider "commercial purposes"? For example, are you against the practice of distributing copies of a game on cartridge for a fee? Or do you want your cut of said fee?


Top
 Profile  
 
PostPosted: Mon Jun 05, 2017 1:48 pm 
Offline

Joined: Tue Jul 12, 2011 10:58 am
Posts: 263
tepples wrote:
Why .pyc and not .py? I don't know how to make a patch against a .pyc.

And why "distributed free of charge for non-commercial purposes"? What do you consider "commercial purposes"? For example, are you against the practice of distributing copies of a game on cartridge for a fee? Or do you want your cut of said fee?


Oh, poop. I didn't see where the license was. This detail greatly effects me as I publish and sell some of my games. Left a salaried job to do so.


Top
 Profile  
 
PostPosted: Tue Jun 06, 2017 4:24 pm 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 186
Can you post some example Noism code showing off the features?


Top
 Profile  
 
PostPosted: Thu Jun 08, 2017 2:40 pm 
Offline

Joined: Mon Apr 07, 2008 6:08 pm
Posts: 322
Location: Missouri
Thanks everyone for your interest. I made an example Noism file that walks through the basic syntax and a text highlighter for Notepad++ (where I do most of my work).

Tepples: Noism might as well be open src because pyc readily decompiles back to the original Python code. But I want to clean it up before putting out a proper open src version.

As to my plans for Noism itself I'll address that in a PM to those who asked.


Attachments:
highlight_example.zip [2.5 KiB]
Downloaded 27 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 7 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