Returning to Assembler Coding

flash · 12967

Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
on: December 16, 2008, 10:30:20 am
Was thinking about what we were talking about HK, What about if we both picked an OLD system and had a play with that in asm?

Ie. Atari 5200/7800, Vectrex, Coleco, Intellivision...?

Find a system with good documentation and a well established ASM dev set up?

Might be fun if with both had a play with it?

whatcha think?

Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #1 on: December 16, 2008, 01:10:45 pm
I'd love to work with you on writing a game for the Nintendo DS. As I said it is just like coding an old console/computer anyway. The ARM9/7 are great little chips too. I would prefer to code in "C" though, but we could of course mix the two and have parts optimized in asm by you and I could learn a bit about optimization that way as well. I've always wanted to port the C64 game The Detective Game to the DS because I enjoyed that game so much as a kid and it had such a great atmosphere and when you walked into a room when someone had been murdered you would jump for a six. I pretty much mapped out the entire game and all that already but I think the graphics would need to be redone. Obviously one of the DS's tile modes would be perfect for it.

Here is a little demo of what I was doing on the GBA (you can run this in Visualboy Advanced) and certain buttons demonstrate different things you can scroll through the different sprites and animate them as well as get the scroller to play. This was done on the GBA but I'd like to re-write it for the DS. I also have a Mod Player for the DS so we could convert the sid tune to a mod somehow for the music.



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #2 on: December 16, 2008, 01:19:45 pm
It would be nice to work on a DS title. Though, perhaps starting with something simpler to EASE into it! As I said, my problem is finding the time - I have all them DB's that some bastard got me into ;)

I was trying to find a good Arm7/9 asm/sdk, A graphical editor (also one for 6502/10) to have a play with, have not really had much joy yet - though only had a quick search..

I will check out the c64 game!!! (Warhawk DS :) )

Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #3 on: December 16, 2008, 01:29:27 pm
Well for me it would be easier to code a DS title than to start learning to code the C64 from scratch. And I have the same problem with time as well. Coding in "C" means you can go much further than to code something from scratch in asm. I understand you probably just want to have a bit of a tinker with some old asm for fun which is fine too.

PS For the DS DevKitPro is the way to go ;) I believe it includes an asm compiler as you can do inline assembly and mix it with pure "C".

BTW That demo I posted really was a very early play with getting the graphics working. So it's really nowhere near a game like Warhawk. Warkhawk DS could be the go ;)
« Last Edit: December 16, 2008, 01:30:59 pm by headkaze »



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #4 on: December 16, 2008, 02:11:46 pm
Doctor Morem looks a bit like me.......  :'(

Well... I will look into devkitpro (god, I wish i had time to learn C) and see what it is like with Arm9 asm.

It is certainly worth a play. Would of been really handy if I still had the source to warhawk, would've been able to use it so easily.

I have not played the detective game and will have to look at it!

But I really do not mind what I do on the DS, so anything would be fun to play with.

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #5 on: December 16, 2008, 04:00:28 pm
Been playing with DevKitPro which is fine in C, but have had no joy trying to find a way to start a ds project in asm.

Have searched for a single ASM example, and drawn a blank.

What I need is a way of setting variables for all memory areas, regs for the DS, Ie. Interrupt flags, screen space, etc.. A Template as it were. Things were still easier in the C64 days. You had your computer and just coded. Told the prog counter where to assemble from and execute.
Now with the ds, you need a header to build the rest of the app/game from.

Found these though, which are quite handy


Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #6 on: December 16, 2008, 06:44:35 pm
I didn't realise how hard it would be to track down the technical docs for the DS. But I did manage to get them. The gbatek.htm is supposedly more up to date but I used to use the DSTek doc.



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #7 on: December 17, 2008, 07:19:46 am
What I was looking for was a set up along the lines of the examples that come with the toolkit for the DS in Asm. Perhaps an include that has all the regisers set out. I will have to make one I think...

No sure how to write the code in to compile Arm asm rather than C.

Coding for the love of it!


Offline tspeirs

  • Altair 8800
    • Posts: 5
Reply #8 on: December 19, 2008, 09:35:01 pm
Was thinking about what we were talking about HK, What about if we both picked an OLD system and had a play with that in asm?

Ie. Atari 5200/7800, Vectrex, Coleco, Intellivision...?

Find a system with good documentation and a well established ASM dev set up?

Might be fun if with both had a play with it?

whatcha think?

I just sent you an email on a similar topic. Id really get a kick out of something like this too. Unfortunatly business is not going good and I need to focus on it, but otherwise Id love to get involved . In some ways im kicking myself as if I had a 9 to 5, id probably be doing this right now, and I have probably more time than most.



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #9 on: December 19, 2008, 10:03:55 pm
That would be awesome if you joined in Tom!

I'm currently investigating how to get assembly compiling for GBA / Nintendo DS. For me I'll probably be concentrating on "C" but the DevKitPro compiler uses GCC which also has an asm compiler. I have never done a pure asm project yet so I'll try and figure that out first and post up a small tutorial. You don't have to own a GBA or Nintendo DS to write homebrew for these systems either as the emulators are good enough these days. But it is really cool to get stuff you've written running on hardware :)

Anyway I'll keep you posted..

EDIT: Hey Flash maybe we should make another board called "Programming" where we can post all our experiments related to this? What do you think?
« Last Edit: December 19, 2008, 10:15:20 pm by headkaze »



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #10 on: December 19, 2008, 10:27:20 pm
That would be awesome if you joined in Tom!

I'm currently investigating how to get assembly compiling for GBA / Nintendo DS. For me I'll probably be concentrating on "C" but the DevKitPro compiler uses GCC which also has an asm compiler. I have never done a pure asm project yet so I'll try and figure that out first and post up a small tutorial. You don't have to own a GBA or Nintendo DS to write homebrew for these systems either as the emulators are good enough these days. But it is really cool to get stuff you've written running on hardware :)

Anyway I'll keep you posted..

EDIT: Hey Flash maybe we should make another board called "Programming" where we can post all our experiments related to this? What do you think?
Perhaps a programming board would be a good idea.

I have not had any more time to look into the ds stuff as yet (did have a look at intellivision and vectrex - both look fun), but I will do..

If you get anywhere with initialising a pure asm ds compile from DevKitPro, please let me know. I was banging my head againt the wall and found no asm examples. You have a better grounding in these things.. My memory was setting pc=XXXX and writing... no headers or inits involved - simple bliss (and they called it low level - pah)

Coding for the love of it!


Offline techno_wiz_oz

  • ZX80
  • *
    • Posts: 19
Reply #11 on: January 23, 2009, 10:59:56 pm
I'm currently toying with a new project for the C64, conversion of an arcade game called Vanguard. Once again it is an arcade conversion that the Atari 2600 had and the Atari 8bit home computers but the C64 never got!. The thing is I don't want it to look like the arcade version but the super colourful Atari VCS version. Anyway this means it has to be in Assembly language no choice (for the rasters to give it the colourful look!)

Now I never coded ASM before in my younger days when these machines were around, and did a little bit last year (simple stuff just to see sprite multiplexing emerge from the mad typings of my own fingers) but god is that stuff hard to get your head around when you are 30 something and never coded any ASM before!

I think once you get used to the different way of thinking then in a way it is easier, you can code something 100 ways in a structured language but in ASM it's more about optimising the few ways you can do stuff yes? Would everyone agree with that?

The horizontal levels will be ok I think, no difficult mux sprites to be kept track of and the rasters will never move during gameplay. However the vertical sections will need to scroll the character graphics AND simulate colour scrolling by moving rasters too, This will be a challenge for a newbie like me so I might do level 2 demo first to see if I can even do it :)

http://uk.youtube.com/watch?v=epWjexDMznY&fmt=18



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #12 on: January 31, 2009, 05:10:09 am
techno_wiz_oz: I have picked up arm assembly pretty quickly since I started only about a month and half ago. If you understand boolean logic and the stack then it's pretty easy IMHO. And yes I'm also 30 something so you can teach an old dog new tricks ;)

Have you checked out the book C64: Programmers Reference Guide in our downloads section? It's supposed to be the book for the C64.

Keep us posted about your progress!



Offline Tempest

  • Jupiter Ace
  • *
    • Posts: 31
Reply #13 on: January 31, 2009, 10:53:40 am
I would like to ask you two to post again when your 45, and let me know how it's going... I'll give you a hint - It sucks!  :-[



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #14 on: January 31, 2009, 11:10:06 am
im 42 - getting there

Coding for the love of it!