The Difficulty of ARM Assembly

You can talk about almost anything that you want to on this board.

Moderator: Moderators

psycopathicteen
Posts: 2911
Joined: Wed May 19, 2010 6:12 pm

Re: The Difficulty of ARM Assembly

Post by psycopathicteen » Thu Feb 21, 2019 2:13 am

Drew Sebastino wrote:I just looked up the 6309; looks like a fun processor to work with, but it's unfortunate nothing very popular ever used it.

I have a processor in that same situation, and it's the 65ce02. From what I've read of it, It's mostly less capable than the 65816, being closer to the 65c02, except for one big difference, and that's a third "z" index register, which I'm very envious of... Minimum cycles per instruction is also 1 instead of 2, so performance might actually be better in certain areas. Looks like it was only used for the Amiga serial port card though...
Yeah, there were a lot of cool processors made in the late 80s that barely got any use because of all the hype the 68000 got. People just focused way too much on register size and bit size completely ignoring instruction efficiency.

nocash
Posts: 1135
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: The Difficulty of ARM Assembly

Post by nocash » Thu Feb 21, 2019 6:59 am

Concerning the thread title, all those speculations about existing or non-existing 6xxx variants could be summarized in one question:
What if a hypothetically improved 6xxx were ARM?
And the answer to that question is:
ARM is improved 6xxx.

So why don't you just get a GBA, NDS, DSi, or 3DS and learn ARM-Assembly? Then you would have a NES/SNES-like console with the kind of faster processor that you are talking about.

tepples
Posts: 21841
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: The Difficulty of ARM Assembly

Post by tepples » Thu Feb 21, 2019 9:43 am

nocash wrote:So why don't you just get a GBA, NDS, DSi, or 3DS and learn ARM-Assembly?
Copyright technicalities in some countries ban sale of flash adapters for (say) Nintendo DS but not those for NES.

nocash
Posts: 1135
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: The Difficulty of ARM Assembly

Post by nocash » Thu Feb 21, 2019 1:01 pm

Well, that shouldn't stop homebrew. The nice thing about GBA and up is that they can boot homebrew via Link Cable (or via Wifi in later models (and additionally from built-in SD card slot in even later models (but Wifi is definetly most useful for testing/developing homebrew code))).

Having or not-having flashcards is really a non-issue for homebrew on that consoles (unless one wanted to sell homebrew games in cartridge format (or unless one would somehow manage to make a game that exceeds the internal memory limits of the console, though that's unlikely to happen for people who are familar with things like NROM limitations)).

I have been doing quite a lot of coding on those handhelds (mainly rev-engineering stuff), and I have never needed a flashcard for that, and I couldn't even imagine what a flashcard could be useful for (well, except for running code from people who did have exceeded the internal memory limitations, like people who made a "hello world" as move clip).

Concerning ease of use, the DSi should be currently offering the fastest and most comfortable way to boot homebrew, immediately after power-up, and without needing any special hardware like link cables or cartridges. And a used DSi is potentially cheaper than NES flashcarts.

User avatar
NovaSquirrel
Posts: 378
Joined: Fri Feb 27, 2009 2:35 pm
Location: Fort Wayne, Indiana
Contact:

Re: The Difficulty of ARM Assembly

Post by NovaSquirrel » Thu Feb 21, 2019 3:01 pm

Drew Sebastino wrote:I have a processor in that same situation, and it's the 65ce02. From what I've read of it, It's mostly less capable than the 65816, being closer to the 65c02, except for one big difference, and that's a third "z" index register, which I'm very envious of... Minimum cycles per instruction is also 1 instead of 2, so performance might actually be better in certain areas. Looks like it was only used for the Amiga serial port card though...
Remember that the Z register is really limited and the only addressing mode it's got is (zeropage),z, but I've had tons of situations where even that would be very helpful to have. Other goodies are STX Absolute,y, STY Absolute,x and conditional jumps, though those are really just a code size/speed improvement rather than dramatically changing how programs are written.

User avatar
TmEE
Posts: 729
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: The Difficulty of ARM Assembly

Post by TmEE » Thu Feb 21, 2019 4:21 pm

What assemblers are there for ARM ? I have been trying to find something and google isn't being helpful. Assembler is supposed to be the thing that turns code into program not the code itself...

User avatar
nin-kuuku
Posts: 15
Joined: Tue Jan 24, 2017 1:23 am

Re: The Difficulty of ARM Assembly

Post by nin-kuuku » Thu Feb 21, 2019 5:03 pm

What assemblers are there for ARM ? I have been trying to find something and google isn't being helpful. Assembler is supposed to be the thing that turns code into program not the code itself...
I use FASMARM for NDS coding.

tepples
Posts: 21841
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: The Difficulty of ARM Assembly

Post by tepples » Thu Feb 21, 2019 6:33 pm

A lot of GBA and DS devs use GNU Binutils as a cross-assembler and linker. It comes as part of devkitARM.

Garth
Posts: 153
Joined: Wed Nov 30, 2016 4:45 pm
Location: Southern California
Contact:

Re: The Difficulty of ARM Assembly

Post by Garth » Thu Feb 21, 2019 6:50 pm

TmEE wrote:Assembler is supposed to be the thing that turns code into program, not the code itself...
Right. "Assembler" is what the tool is called. The language is "assembly language," not "assembler." The constant misuse of terms does bother me.
http://WilsonMinesCo.com/ lots of 6502 resources

calima
Posts: 1058
Joined: Tue Oct 06, 2015 10:16 am

Re: The Difficulty of ARM Assembly

Post by calima » Fri Feb 22, 2019 1:34 am

Nocash, your POV seems to limit homebrew severely. If you have an advanced console, possibly even with 3d ability, why would you make a NES-style game? Any amount of decent art, music or sfx will take more space than the free RAM.

nocash
Posts: 1135
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: The Difficulty of ARM Assembly

Post by nocash » Fri Feb 22, 2019 11:27 am

Uh, yes, I grew up in 80ties, so I am quite critical about details like "is that program really worth it's memory requirements?" The ratio between code and data could easy vary by factor 1000 (eg. think of a slideshow with uncompressed bitmaps). And the amount and quality of work, artwork, features, etc. may also vary in similar fashion. If the result looks good then it's fine, if the size is reasonable then it's even better, and I think it's most impressive if it's tightly squeezed and still looks good.

Anyways, avaible memory for code/data on handhelds without flashcards:
GBA allows to load 128Kbytes 256Kbyte to RAM.
NDS allows to load 2.75Mbytes to RAM.
DSi allows to load 6.25Mbytes to RAM, and, if really needed, you could have further 128Mbyte on SD card.
I don't think that the available memory sizes do restrict homebrew too much. Or if they do: please blame that on Nintendo, it isn't my fault!

The other issue is that many homebrew programs may rely on loading data from flashcards, not because they do actually need the flashcard for a good reason, but rather because the programmers didn't knew that they could make games without flashcards.
That's no problem if you are developing a game yourself - but it could be a problem if you want to download games made by other people.
Last edited by nocash on Fri Feb 22, 2019 8:46 pm, edited 1 time in total.

User avatar
Dwedit
Posts: 4251
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: The Difficulty of ARM Assembly

Post by Dwedit » Fri Feb 22, 2019 7:01 pm

What? GBA is 384K of total memory (video, fast iwram, and ewram), not exactly 128k. It can load sizes approaching 256k from link cables. I've used every byte of the GBA's memory before, even doing stupid things like storing code in Palette memory (no$gba gives warnings when I jump there).
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

nocash
Posts: 1135
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: The Difficulty of ARM Assembly

Post by nocash » Fri Feb 22, 2019 9:37 pm

Oops, yes, 256Kbytes for GBA, sorry. When comparing NES/SNES video with 2D engine in NDS and GBA, I meant that the video hardware works similar (so one could focus on learning ASM without needing to worry about video), but of course one could use more colors & sounds than NES, and with the GBA's 128Kbyte 256Kbyte RAM, there's enough space to make a colorful equivalent to a 32K NES game.

3D video in ASM is probably quite rare. Though it might work quite well with 2.5Mbyte RAM. I think there are some "big" PSX games that don't use more than that amount of memory (and have the remaining 600Mbyte+ padded with CD-DA audio tracks or cut-scene movies).

I don't know which countries are banning flashcarts, but one could get started without flashcart, and it should be some work to exceed the RAM memory limit, but if that happens... then one could still consider importing a flashcart one way or another.
TmEE wrote:What assemblers are there for ARM ? I have been trying to find something and google isn't being helpful. Assembler is supposed to be the thing that turns code into program not the code itself...
I am using the "utility --> assembler" function in no$gba for ARM source code. It's small and simple and fast. A small sample source code file is included in Magic Floor, and a bigger one is in Wifiboot (both on the no$gba webpage).

The downside is that macros are almost completely unsupported, and there's some hardcoded 4MB size limit, and the syntax is somewhat different than normal ARM code (if you are using the ".nocash" directive, without that it should also accept the more common #0xNNN immediate format).

The no$gba assembler isn't so bad if you just want to start coding. But you might prefer other tools for bigger projects. I am not too sure if there are many bigger ARM/ASM projects, most people seem to use compiler code on ARM, sometimes mixed with some ASM functions). As far as I know, the standard package for homebrew on nintendo handhelds would be devkitpro, it's freeware, and it includes compiler & assembler & libraries for gba/nds/dsi.
Basic things like 2D video and sound should work without needing libraries, but libs could be useful for some additional NDS/DSi features, like touchscreen configuration, wifi, or accessing SD cards with FAT filesystem.

Post Reply