It is currently Thu May 23, 2019 1:44 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: asm6 Ilegal Instruction
PostPosted: Mon Dec 17, 2018 11:38 am 
Offline
User avatar

Joined: Mon Aug 13, 2018 5:10 am
Posts: 25
Location: Notts
Hello all,

I'm so new here, and I've been looking for an answer around but I could't find any. If it is a topic already about this, I apologice in advance.

Last weeks I've been learning assembler (I'm an ex java programmer) and playing around with the Nerdy Nights.

Now I'm trying to setup ConTEXT with asm6 as it looks like a good option for developing (I think I rather sublime text, but we will see).

The point is, when I'm trying to run asm6 with the sprites file from Nerdy Nights, I get the "Ilegal Instruction" in a lot of lines that in theory are right and necessary as:

.inesprg 1 ; 1x 16KB PRG code
.ineschr 1 ; 1x 8KB CHR data
.inesmap 0 ; mapper 0 = NROM, no bank swapping
.inesmir 1 ; background mirroring
.bank 0


why is that? that asm6 use other sintaxis?

On the other hand, is there any good asm6 tutorial?

Thanks! :D


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 12:02 pm 
Offline
User avatar

Joined: Mon Aug 13, 2018 5:10 am
Posts: 25
Location: Notts
I'm trying CA65 and I have the same problem, so I guess those were just instructions for NESASM3...
If I'm right, how do you manage this for ca65? do you include the nes file? If you do, how do you do it?
Thanks


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 12:11 pm 
Online
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4172
ASM6 doesn't use directives to define how a NES cartridge is laid out.
You need to directly emit the header bytes yourself.

.db "NES",$1A (etc...)
$ = $8000
code goes here

.org $FFFA
vectors go here

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 12:25 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11348
Location: Rio de Janeiro - Brazil
And it doesn't have a BANK directive either. Different assemblers have different sets of directives available and different overall philosophies on how to format a proper ROM file. Dumping code written for one assembler straight into another will never work.


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 12:29 pm 
Offline
User avatar

Joined: Mon Aug 13, 2018 5:10 am
Posts: 25
Location: Notts
Cool, thank you so much! I learned a new thing today :D :D

Is there any good tutorial or sample about how to do this in ca65?


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 1:27 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11348
Location: Rio de Janeiro - Brazil
I'm not aware of any ca65 tutorials, but tepples and rainwarrior have posted sample projects in the past. The official documentation for ca65 is very comprehensive, so be sure to check that out as well.


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 1:49 pm 
Offline
User avatar

Joined: Mon Aug 13, 2018 5:10 am
Posts: 25
Location: Notts
I will, thank you mate!


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 3:48 pm 
Offline
User avatar

Joined: Wed Sep 07, 2005 9:55 am
Posts: 364
Location: Phoenix, AZ
IIRC, there is a fork of asm6 that has those ines header directives added. asm6f I believe??

_________________
. That's just like, your opinion, man .


Top
 Profile  
 
PostPosted: Mon Dec 17, 2018 4:11 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 4076
Location: A world gone mad
Correct, asm6f provides several new features including generation of NES headers (original or 2.0) via pseudo-ops. Binary releases are on the Release tab/page.

Regardless, poster must understand asm6 != NESASM != ca65. Never forget.


Top
 Profile  
 
PostPosted: Wed Dec 19, 2018 11:52 am 
Offline
User avatar

Joined: Mon Aug 13, 2018 5:10 am
Posts: 25
Location: Notts
Yeah, thanks guys! Finally I think I will start everything with ca65 as it looks like a good option.

koitsu wrote:
Regardless, poster must understand asm6 != NESASM != ca65. Never forget

Yep, I got it now, haha


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 6 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