Just a SNES-related thing for anyone willing...
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
Just a SNES-related thing for anyone willing...
I need some code-converting help here.
I cannot convert SMBDIS to WLA-DX NES code, As it is part of my processing plan for converting it to SNES.
I need a real bunch of help on either converting Nevketsi's SNES Starterkit to CA65 or Converting SMBDIS to WLA-DX,
If anyone already converted SMBDIS to WLA-DX compatible code, please post it here,
The reason is that I hate the way WLA-DX handles lables and in-code math stuff compared to X816/CA65, When porting, you have to either ruin the code or leave it alone and forget about porting it to SNES!
I cannot convert SMBDIS to WLA-DX NES code, As it is part of my processing plan for converting it to SNES.
I need a real bunch of help on either converting Nevketsi's SNES Starterkit to CA65 or Converting SMBDIS to WLA-DX,
If anyone already converted SMBDIS to WLA-DX compatible code, please post it here,
The reason is that I hate the way WLA-DX handles lables and in-code math stuff compared to X816/CA65, When porting, you have to either ruin the code or leave it alone and forget about porting it to SNES!
AKA SmilyMZX/AtariHacker.
Re: Just a SNES-related thing for anyone willing...
I think this might be the better option, unless you really want WLA-DX for its SPC700 support and you really don't want to have two assemblers installed.Hamtaro126 wrote:I need a real bunch of help on either converting Nevketsi's SNES Starterkit to CA65
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
Re: Just a SNES-related thing for anyone willing...
Agreed, Converting it to CA65 is recommended. If Nevketsi was still around right now (Hopeing for a remade and updated version), It could save the SNESDEV scene's butt,tepples wrote:I think this might be the better option, unless you really want WLA-DX for its SPC700 support and you really don't want to have two assemblers installed.Hamtaro126 wrote:I need a real bunch of help on either converting Nevketsi's SNES Starterkit to CA65
My comment on WLA-DX is it should be nicknamed ''Wierd and Lame Assembler'' (hence the capatalized W, L, and A)
AKA SmilyMZX/AtariHacker.
Re: Just a SNES-related thing for anyone willing...
EDIT: just looked up ca65. It's not the assembler I thought. I don't think this one was around when I was trying to choose an assembler. Looks interesting.
---
I don't understand why people complain about WLA DX so much.
A linker can be _very_ useful. It is very painful to arrange a lot of graphics and data by hand to never cross a bank boundary. Because of the linker step, WLA can do this for you.
Yes, you need to explain the memory map, but it is just a couple lines. And for code that will be relocated to RAM, wla's memory map "slot" feature can be quite useful. I also like the powerful macro features, and .enum to easily "allocate" variables in RAM.
I also like anonymous labels (which other assemblers support as well).
Basically, it has a lot of great features. If you don't like them, you don't have to use them ... with the exception of the linker and the couple lines for the memory map.
In the end, to each their own. But I feel people really misunderstand the power of the linker step.
Let me point out that d4s used WLA for his large coding project, probably for several of the same reasons I like it as well.
When first learning to program for a new system, the most painful step is the time period between when you start coding and the first point you can get the system to give you some feedback ... at that point you can "test" and "play" and "debug" all you want. The starter kit was merely to let people start immediately at that point (and also have a couple reference docs about the CPU and PPU).
As an aside, many people misunderstood and I got complaints that it didn't help people learn how to use the system. But, to me at least, that was not the point ... it was not a tutorial. It was merely a starter kit with example code to let you jump into immediately playing with stuff.
In particular, my "init" routine is total overkill just to force everything to a known state.
If you prefer x816/CA65, let me know what routines you actually want from my code and I or others here can probably convert it for you. But converting the whole kit would be a pain since I so heavily use wla macro specific stuff in there.
---
I don't understand why people complain about WLA DX so much.
A linker can be _very_ useful. It is very painful to arrange a lot of graphics and data by hand to never cross a bank boundary. Because of the linker step, WLA can do this for you.
Yes, you need to explain the memory map, but it is just a couple lines. And for code that will be relocated to RAM, wla's memory map "slot" feature can be quite useful. I also like the powerful macro features, and .enum to easily "allocate" variables in RAM.
I also like anonymous labels (which other assemblers support as well).
Basically, it has a lot of great features. If you don't like them, you don't have to use them ... with the exception of the linker and the couple lines for the memory map.
In the end, to each their own. But I feel people really misunderstand the power of the linker step.
Let me point out that d4s used WLA for his large coding project, probably for several of the same reasons I like it as well.
I'm not sure what you need the starter kit for.Hamtaro126 wrote:I need a real bunch of help on either converting Nevketsi's SNES Starterkit to CA65 or Converting SMBDIS to WLA-DX
When first learning to program for a new system, the most painful step is the time period between when you start coding and the first point you can get the system to give you some feedback ... at that point you can "test" and "play" and "debug" all you want. The starter kit was merely to let people start immediately at that point (and also have a couple reference docs about the CPU and PPU).
As an aside, many people misunderstood and I got complaints that it didn't help people learn how to use the system. But, to me at least, that was not the point ... it was not a tutorial. It was merely a starter kit with example code to let you jump into immediately playing with stuff.
In particular, my "init" routine is total overkill just to force everything to a known state.
Out of curiousity, what exactly is WLA DX forcing you to do to the code?Hamtaro126 wrote:The reason is that I hate the way WLA-DX handles lables and in-code math stuff compared to X816/CA65, When porting, you have to either ruin the code or leave it alone and forget about porting it to SNES!
If you prefer x816/CA65, let me know what routines you actually want from my code and I or others here can probably convert it for you. But converting the whole kit would be a pain since I so heavily use wla macro specific stuff in there.
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
Re: Just a SNES-related thing for anyone willing...
Yes, Please! I'd like to let you have at least the INIT code, Palette code, VRAM, HDMA and DMA Upload code to be rewritten in this case.neviksti wrote:Out of curiousity, what exactly is WLA DX forcing you to do to the code?
If you prefer x816/CA65, let me know what routines you actually want from my code and I or others here can probably convert it for you. But converting the whole kit would be a pain since I so heavily use wla macro specific stuff in there.
If you can, ASM6 (somehow compatible with X816 with fewer modifications) by Loopy (Yes, The Legend himself) can be found at http://home.comcast.net/~olimar/NES/asm6.zip
AKA SmilyMZX/AtariHacker.
Mostly because it's so different from the norm in terms of conventions, and most people working on SNES projects aren't writing large software programs.I don't understand why people complain about WLA DX so much.
xkas is vastly superior for small projects like emulator test ROMs and Japanese->English translations, because it lets you get right to business with no fuss. I compare it as the NASM to WLA-DX's MASM / TASM. No red tape.
To me, the biggest advantage of a linker is the ability to only need to compile changed files. But when you consider that building even ~200kb of assembler code takes about 100ms on a modern PC (and ~90% of that is disk overhead of writing the 4MB image file to disk), it's not really a big deal.
WLA-DX's automatic RAM variable allocation is nice, but that doesn't require a linker.
Not even WLA can handle code crossing bank boundaries (would have to rewrite JSR/JSLs and subsequently branches that are now too far apart to BRLs, etc), and any hobbyist code should really be using HiROM anyway which obviates the need to worry about data crossing boundaries.
Also, it's very rare to write more than 64kb (in assembled form) of pure ASM code anyway. Almost every game I've touched has put entire systems into their own specific banks. Both for speed reasons and because there's plenty of room for it.
Of course, there are other smaller linker advantages I haven't mentioned. And for someone used to traditional programming where each source file gets its own object file, WLA-DX can't be beat. At least not in the legal category (Psy-Q is quite a bit nicer, from what I hear.)
Re: Just a SNES-related thing for anyone willing...
Yeah, absolutely! (Although I'm not actually using the linker all that much)neviksti wrote: In the end, to each their own. But I feel people really misunderstand the power of the linker step.
Let me point out that d4s used WLA for his large coding project, probably for several of the same reasons I like it as well.
I think it's a matter of preference in the end.
It's a good thing we have different solutions to choose from.
Wla-Dx has worked quite well for me in the past, so I'm sticking to that for now.
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
Re: Just a SNES-related thing for anyone willing...
What about porting a certain assembly format to another, Like 2 posts before this, X816 to WLA-DX is almost impossible to do for my opinion, So many attemts even with the math the code has failed.d4s wrote:Yeah, absolutely! (Although I'm not actally using the linker all that much)neviksti wrote: In the end, to each their own. But I feel people really misunderstand the power of the linker step.
Let me point out that d4s used WLA for his large coding project, probably for several of the same reasons I like it as well.
I think it's a matter of preference in the end.
It's a good thing we have different solutions to choose from.
Wla-Dx has worked quite well for me in the past, so I'm sticking to that for now.
For example, I could not port:
Code: Select all
LDA #$-0F
Code: Select all
#DEFINE TitlescreenDataOffset <$1ec0
Code: Select all
.DC.B <GroundPaletteData .......
....... .DC.B >GroundPaletteData
Last edited by Hamtaro126 on Sun Jul 12, 2009 5:48 pm, edited 1 time in total.
I find WLA-DX very weird and probably wouldn't use it, though I know some people swear by it. To clear up any confusion about CA65, it's more commonly referred to as CC65 (since that's the kit it comes with - C compiler, assembler, linker)
I'd think I think if you take the '#DEFINE' part off, that should work in any assembler.And then the worse happens while porting This:
Code: Select all
#DEFINE TitlescreenDataOffset = <$1ec0
Re: Just a SNES-related thing for anyone willing...
Code: Select all
LDA #$-0F
Code: Select all
#DEFINE TitlescreenDataOffset = <$1ec0
Regarding "<", in many assemblers, the characters "<", ">", "^", and "!" can have special use -- but there's no standard. If this is X816 syntax, "<" loads the low byte ($c0) of the address, ">" loads the high byte ($1e), "^" loads the bank (known by the assembler and is based on .ORG or .BASE), and "!" loads the 16-bit word value ($1ec0).
However, if you were to use ORCA/M, you'd find that "<" loads the 16-bit word of an address, ">" induces long (24-bit) addressing, "^" loads the bank, and I forget what "!" does (I believe bitwise NOT on the immediate/literal value).
Code: Select all
.DC.B <GroundPaletteData .......
....... .DC.B >GroundPaletteData
Bottom line:
Welcome to working with different assemblers. I hate to sound rude, but you're crying over spilt milk here. As someone who has worked with numerous 6816 assemblers over the years (Merlin 16, Merlin 16+, ORCA/M, X816, and some custom ones), I don't have much sympathy. :-) I remember having to "port" some code from 65816 cross-assemblers on the Amiga to X816 and ORCA/M back in the day, and it was a tedious process -- and remember, just because something assembles w/out warnings or errors doesn't mean it's going to work!
If the disassembler you're using doesn't output code that's compatible with the assembler you're using, use a different disassembler, or use a different assembler. What you go with is your choice. You can ask people here what they'd recommend, but use whatever tools you feel comfortable with above all else.
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
Yeah, I screwed up on that part of syntax but corrected it.Memblers wrote:I find WLA-DX very weird and probably wouldn't use it, though I know some people swear by it. To clear up any confusion about CA65, it's more commonly referred to as CC65 (since that's the kit it comes with - C compiler, assembler, linker)
I'd think I think if you take the '#DEFINE' part off, that should work in any assembler.And then the worse happens while porting This:
Code: Select all
#DEFINE TitlescreenDataOffset = <$1ec0
Memblers is right, WLA-DX really should be left alone (Except for Sega 8bit development, in Which I could not learn Z80 Assembly, Too complex) until ''the new person'' is advanced enough for WLA-DX,
What CC65 (or in this case the assembler CA65) Has to offer is portable, better and eaiser than any other assembler I have seen, and is still in active development!
The banks are not screwy as in WLA-DX NES-wise, and X816 users simply can convert to CC65's CA65 with fewer modifications.
AKA SmilyMZX/AtariHacker.