Getting Started
Moderator: ZSNES Mods
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
Getting Started
Hi. I just found out today about all those things about making a snes game with assembler 65816. But I got some nooby questions and things to straighten up for all of you. (:
First, 65816 used for SNES-programming, coul u say this to be the language? And if almost: what is it really called? Or is the number just some sort of "version" of assembly which uses different keywords?
Secondly, 6502? Is this the asm. ver. used to programm NES-games? And could you call it a parent to 65816?
Thirdly, I've senn both 65816 and 65c816 while surfin' the net. Really, what does that c mean?
Fourthly (lol can you say that word?), Is x816 and WLA the two biggest compilers for compiling asm. 65816 code?
Fifthly (Starting to get tiresome), I've tried with both x816 and WLA to compile a usable .smc file, but haven't managed. First I got the error "not enough memory" for x816 but then i changed some memory things and compatibility mode and got it to work. But still when i try compile some source code i have, it won't make any fole out of this, and neither do i get an error? wth am i doing wrong?
I didn't got it to work with WLA, so could someone please explain what to do, or give me a source code u know works so I can try and see if there isn't anything corrupt which my files (which there probably isn't).
Btw, I got these two programs from nesdev.parodius.com (Snes-starterkit and x816). Or is there any other place to get these?
I tried looking for an easy faq or so, but I catually I must be quite dumb =P
So please answer I'm waiting =)
First, 65816 used for SNES-programming, coul u say this to be the language? And if almost: what is it really called? Or is the number just some sort of "version" of assembly which uses different keywords?
Secondly, 6502? Is this the asm. ver. used to programm NES-games? And could you call it a parent to 65816?
Thirdly, I've senn both 65816 and 65c816 while surfin' the net. Really, what does that c mean?
Fourthly (lol can you say that word?), Is x816 and WLA the two biggest compilers for compiling asm. 65816 code?
Fifthly (Starting to get tiresome), I've tried with both x816 and WLA to compile a usable .smc file, but haven't managed. First I got the error "not enough memory" for x816 but then i changed some memory things and compatibility mode and got it to work. But still when i try compile some source code i have, it won't make any fole out of this, and neither do i get an error? wth am i doing wrong?
I didn't got it to work with WLA, so could someone please explain what to do, or give me a source code u know works so I can try and see if there isn't anything corrupt which my files (which there probably isn't).
Btw, I got these two programs from nesdev.parodius.com (Snes-starterkit and x816). Or is there any other place to get these?
I tried looking for an easy faq or so, but I catually I must be quite dumb =P
So please answer I'm waiting =)
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
Yes, this is the programming language, commonly referred to as 65816 asm.First, 65816 used for SNES-programming, coul u say this to be the language? And if almost: what is it really called? Or is the number just some sort of "version" of assembly which uses different keywords?
6502 is the CPU for the NES. So, yes it's the asm version for NES games.Secondly, 6502? Is this the asm. ver. used to programm NES-games? And could you call it a parent to 65816?
This is all I can answer for you, sorry.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
Re: Getting Started
"65816" is the name of the processor. CPUs don't use a language, they just expect opcodes and opcode parameters. ASM is one way to write down these opcodes in a more readable way; the "language" could then be called "65816 ASM" or "65816 assembler" or "65816's ASM dialect" or whatever you want to use.Pixelgamer wrote:First, 65816 used for SNES-programming, coul u say this to be the language? And if almost: what is it really called? Or is the number just some sort of "version" of assembly which uses different keywords?
Yep, the 6502 CPU is the 65816's precursor (w?) in the same processor family.Pixelgamer wrote:Secondly, 6502? Is this the asm. ver. used to programm NES-games? And could you call it a parent to 65816?
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: Getting Started
The 65C816 is the CMOS version of the 65816. Meaning it has a few opcodes more than the 65816.Pixelgamer wrote:Thirdly, I've senn both 65816 and 65c816 while surfin' the net. Really, what does that c mean?
Anyway, the SNES main cpu is a 5A22, a custom chip very close to a 65c816 but not the exact same. The differences are probably minimal but could probably cause troubles with programs made for a 65816.
A SMC file is already compiled. It's a binary, the program for the chip to run (it also should have a SMC header for copier use only).Fifthly (Starting to get tiresome), I've tried with both x816 and WLA to compile a usable .smc file, but haven't managed.
You don't feed binary to a compiler, you give it source.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
Re: Getting Started
Oops sry, I must have explained unclearly, i had some source code, which i wanted to make a smc file from, but I didn't manage it to work =/grinvader wrote:A SMC file is already compiled. It's a binary, the program for the chip to run (it also should have a SMC header for copier use only).Fifthly (Starting to get tiresome), I've tried with both x816 and WLA to compile a usable .smc file, but haven't managed.
You don't feed binary to a compiler, you give it source.
Edit: At least I have been able to compile the source codes which comes with WLA in the starter pack, but I haven't been able to compile anything else with WLA, let alone x816...
Try using a real cross assembler.
file.asm :
then run: xkas file.asm file.smc
file.asm :
Code: Select all
lorom
org $8000 : fill $20000 ;pad some space on the image
;add a quick header
org $ffc0
db 'ROM TITLE '
db $30 ;lorom ($31 = hirom)
db $02 ;rom+save ram
db $08 ;2mbit rom
db $03 ;64kb sram
db $00 ;japan
db $00 ;no developer
db $01 ;version 1.1
dw $0000 ;inverse checksum
dw $ffff ;checksum
dw $ffff,$ffff,$ffff
dw $ffff ;brk
dw $ffff
dw $8c00 ;nmi
dw $ffff
dw $8800 ;irq
dw $ffff,$ffff
dw $ffff ;cop
dw $ffff,$ffff,$ffff
dw $8000 ;reset
dw $ffff
org $8000
- bra -
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Code: Select all
<grinvader> it is "revision" and not "version", just because the official term is 'revision', right ?
<DrNach> It's officially Revision, and it's also logically Revision
<grinvader> thanks
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
re·vi·sion (r-vzhn) n.It's officially Revision, and it's also logically Revision
1. The act or process of revising.
2. A revised or new version, as of a book or other written material.
re·vise (r-vz) tr.v. re·vised, re·vis·ing, re·vis·es
1. To prepare a newly edited version of (a text).
2. To reconsider and change or modify: I have revised my opinion of him. See Synonyms at correct.
Therefore, by definition: the first release of a game cannot possibly be a revision. You fail. But I have no intentions of discussing this matter any further, call it whatever the hell you like, and I'll do the same.
Oh, and please don't argue that the first version is a "new version", the intent made by the definition is clearly implying that a version already existed beforehand.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Are you forgetting the concept of betas ? The released games aren't the first revision at all.byuu wrote:the intent made by the definition is clearly implying that a version already existed beforehand.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
A Revision of zero means no Revision, I don't think this is a hard concept.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
So, going by what Nach and grinvader say, would this be Version 1, Revision 1? Meaning, there was an initial release, Version 1, Revision 0, followed by Version 1, Revision 1?byuu wrote:Code: Select all
db $01 ;version 1.1
byuu, has version 1 had any revisions? Or do you start with 1.1 as the first version, no revisions?
[url=http://zsnes-docs.sf.net]Official ZSNES Docs[/url] | [url=http://zsnes-docs.sf.net/nsrt]NSRT Guide[/url] | [url=http://endoftransmission.net/phpBB3/viewtopic.php?t=394]Using a Wiimote w/ emulators[/url]
revision is the correct term - its revision 1.1. the values are arbitrary, there is nothing stopping somebody from using A as the first revision.
Version only applies in comparison to something else - the word has been co-opted by marketing, so you get #3 - the abused meaning everyone uses.
1. A description or account from one point of view, especially as opposed to another: Your version of the accident differs from mine.
3. A particular form or variation of an earlier or original type: downloaded the latest version of the software from the Internet.
4. An adaptation of a work of art or literature into another medium or style: the film version of a famous novel.
version also isn't derivative of revision.
Version only applies in comparison to something else - the word has been co-opted by marketing, so you get #3 - the abused meaning everyone uses.
1. A description or account from one point of view, especially as opposed to another: Your version of the accident differs from mine.
3. A particular form or variation of an earlier or original type: downloaded the latest version of the software from the Internet.
4. An adaptation of a work of art or literature into another medium or style: the film version of a famous novel.
version also isn't derivative of revision.
Does [Kevin] Smith masturbate with steel wool too?
- Yes, but don’t change the subject.
- Yes, but don’t change the subject.
Interesting, I didn't bother to check the definition of version. That just seems wrong to me though. The prefix re- applies "again" or "next". Taking that off logically implies that something could be the first version. But apparently that's not possible according to the definition at dictionary.com.
Ah well, I'll call it what I want and you do the same. We can agree to disagree.
Ah well, I'll call it what I want and you do the same. We can agree to disagree.
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
Slap that in a text file and include it in the zip with xkas I think that was the missing link for recommending xkas to be used for creating new ROMs over the competition for new homebrew developers. A few people I spoke to didn't quite undersatnd how to create a working new ROM with it even after I explained what they need to do to them. A picture(or code example in this case is worth a thousand words.)byuu wrote:Try using a real cross assembler.
file.asm :then run: xkas file.asm file.smcCode: Select all
lorom org $8000 : fill $20000 ;pad some space on the image ;add a quick header org $ffc0 db 'ROM TITLE ' db $30 ;lorom ($31 = hirom) db $02 ;rom+save ram db $08 ;2mbit rom db $03 ;64kb sram db $00 ;japan db $00 ;no developer db $01 ;version 1.1 dw $0000 ;inverse checksum dw $ffff ;checksum dw $ffff,$ffff,$ffff dw $ffff ;brk dw $ffff dw $8c00 ;nmi dw $ffff dw $8800 ;irq dw $ffff,$ffff dw $ffff ;cop dw $ffff,$ffff,$ffff dw $8000 ;reset dw $ffff org $8000 - bra -
My answer to almost any WLA problem is to use xkas! Aside from being functionally sound and superior, it's more intuitive to use. xkas is my most frequently used SNES hacking tool.
Last edited by Nightcrawler on Tue Nov 29, 2005 2:54 pm, edited 1 time in total.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
I can't understand why anyone would want to write memory mapping code for every single bank when two ROM formats can allow for modification of all but four SNES games. Albeit you may occasionally have to "lie" about the address (basically, use base + org at the same time) in some very weird cases. WLA was never specifically optimized for the SNES target. xkas does everything x816 does and more, and it does it faster and better. I have no idea why people keep using WLA and x816 to this day. PsyQ is the only assembler better, and it's not exactly freeware.My answer to almost any WLA problem is to use xkas! Aside from being functionally sound and seperior, it's more intuitive to use. xkas is my most frequently used SNES hacking tool.
And honestly, xkas isn't really even that good. It's just the competition is that much worse.
Hooray. I'm glad you addressed that, I didn't even feel like responding to grinvader's comments about beta versions :/Byuu is correct, it is version but it is not the software version it is the production version. The software version only appears on eproms submitted to nintendo. Overload wins!
No offense grin, we still love you :D
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- New Member
- Posts: 8
- Joined: Thu Nov 24, 2005 10:56 pm
- Location: Örebro, Sweden
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
What are you talking about? That's the newest version. There is no newer version because it doesn't NEED a newer version. Unless Byuu comes up with some new feature he decides to add, which at this point is getting unlikely due to the large number of features already there, why would a new version be needed?Pixelgamer wrote:Thanks, but is there really not a newer version of xkas? (:
It's pretty darn bug free as well. I have been using it regularly for an assortment of applications and have had no problem with it.
So, really? What is your issue with needing a newer version?
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Well, I can't release a new version because I rewrote the string parsing library to be a lot faster / cleaner, and adding in the new library means rewriting most of xkas.
But I would like to try and merge the 65c816 and spc700 assemblers into one. It would be nice to add 'stupid' header generation for those that don't bother to make their own.
Something like
header {
name = "whatever"
reset = $8000
} ;anything not listed is set to defaults, or not modified at all
But x816 is what... like 8 years old now? :/
But I would like to try and merge the 65c816 and spc700 assemblers into one. It would be nice to add 'stupid' header generation for those that don't bother to make their own.
Something like
header {
name = "whatever"
reset = $8000
} ;anything not listed is set to defaults, or not modified at all
But x816 is what... like 8 years old now? :/