News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Where did you learn assembly from?  (Read 1077 times)

LatchGameDev

  • Newbie
  • *
  • Posts: 4
    • View Profile
Where did you learn assembly from?
« on: August 13, 2017, 02:52:14 am »
Hello everyone :)

When I heard about Rom Hacking it seemed like learning assembly was the way to go. I'm on chapter 10 so far and was just wondering where did everyone else learn the assembly language?

PSX MIPS Assembly
http://chortle.ccsu.edu/assemblytutorial/

tvtoon

  • Sr. Member
  • ****
  • Posts: 300
    • View Profile
Re: Where did you learn assembly from?
« Reply #1 on: August 13, 2017, 10:35:58 am »
Learning assembly as in "starting to write ASM code" then "Art of the Assembly", by Randall Hyde.

Psyklax

  • Sr. Member
  • ****
  • Posts: 286
    • View Profile
    • Psyklax Translations
Re: Where did you learn assembly from?
« Reply #2 on: August 13, 2017, 12:46:13 pm »
I'm learning assembly through ROM hacking. :D A guy on this forum explained a couple of instructions which helped me make a hack several months ago, I read up on the basic idea, then hacked a bunch of games. Learning on the job, that's the way I like it. ;)

I should point out I only know about the 6502 used in the NES amongst others. That tutorial of yours is obviously for something a lot more advanced. :)

Disch

  • Hero Member
  • *****
  • Posts: 2519
  • NES Junkie
    • View Profile
Re: Where did you learn assembly from?
« Reply #3 on: August 13, 2017, 01:00:25 pm »
I learned 6502 from the classic "6502.txt" manual, and then writing an emulator based on it.

I would not recommend this approach.

FAST6191

  • Hero Member
  • *****
  • Posts: 2122
    • View Profile
Re: Where did you learn assembly from?
« Reply #4 on: August 13, 2017, 01:48:20 pm »
+1 for art of assembly. I also like Gavin's guide https://stuff.pypt.lt/ggt80x86a/asm1.htm
That mostly did for the concepts involved, independently of that I also did an awful lot of electronics which did not hurt.
http://www.coranac.com/tonc/text/asm.htm
http://blog.quirk.es/2008/12/things-you-never-wanted-to-know-about.html

and of course http://problemkaputt.de/gbatek.htm

Learn one type of assembly and the second will be far easier, learn two and you can muddle your way through most things. Wind in a bit of CPU design history* as well as the general programming logic/functions (ceiling, floor, the various divides...) and boolean operations and you are laughing.

*mainly just enough to not be too put out when you go for an older thing and find it lacks a divide function, floating point and instead of registers being a type of very fast general purpose memory they are almost separate things unto themselves -- for x86 you have however many dozens of registers and thus considering instructions individually for each register is insane but for the NES 6502 with three ones you will spend almost all your time considering and instructions that play accordingly.
I learned 6502 from the classic "6502.txt" manual, and then writing an emulator based on it.

I would not recommend this approach.

Writing an emulator does tend to get you to be quite good at a given system. To that end while I may or may not suggest the former (never read it but being .txt I can imagine it will be a bit lacking compared to some) the latter is worth considering.

That said I think my suggestion for a less intensive method is tracing in emulators. Start from an action replay type cheat and do something cool with it. You might not get the really exotic instructions being used but you can always look those up once you have the core set down.

kuja killer

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: Where did you learn assembly from?
« Reply #5 on: August 13, 2017, 03:35:31 pm »
from a #rom-hacking IRC log by DahrkDaiz i found one day on google search.
Daiz was teaching a couple people like "Solid T-Snake" (some name like that) how to do some simple things with Mario 1 NES. It was a super extremely long conversation, and that's how i learned how to do NES programming. Just because of reading a IRC chat log. :)

Spoiler:
Solid T-Bone
~MoN
« Last Edit: August 14, 2017, 03:19:59 pm by MathOnNapkins »

ineedahorse

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Where did you learn assembly from?
« Reply #6 on: August 14, 2017, 06:40:52 pm »
Hello everyone :)

When I heard about Rom Hacking it seemed like learning assembly was the way to go. I'm on chapter 10 so far and was just wondering where did everyone else learn the assembly language?

PSX MIPS Assembly
http://chortle.ccsu.edu/assemblytutorial/
(To the extent that I know how to code in ASM) I learned a lot from that very tutorial. Really good stuff. I wanted to mod Diddy Kong Racing, but getting beyond the basics (e.g. changing the number of laps) seemed like more effort than I wanted to put into it.

At one point, I also followed along with a series of AtariAge threads about 6502 assembly for the Atari 2600. Also -- on some other site -- there was a NES specific tutorial that I followed long enough to learn how to make a pong game.

For the SNES stuff I'm working on now, I've mostly just perused the opcodes and tried to figure out how the hardware works as best I can. There's a lot of info out there. These links have been helpful:
https://wiki.superfamicom.org/snes/show/65816+Reference
https://emu-docs.org/Super%20NES/General/snesdoc.html
https://en.wikibooks.org/wiki/Super_NES_Programming

Also, I can't recommend bsnes-plus highly enough for SNES romhacking purposes. ;)

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 580
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: Where did you learn assembly from?
« Reply #7 on: August 15, 2017, 06:38:32 pm »
I learned assembly by diving into the FCEUX debugger and using an opcode reference chart. NesDev hardware reference came in handy, too.

Drenn

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Where did you learn assembly from?
« Reply #8 on: August 16, 2017, 11:03:52 pm »
I learned by writing an emulator.

...In retrospect, not the best introduction, but it sure was comprehensive.

RedComet

  • Hero Member
  • *****
  • Posts: 3146
    • View Profile
    • Twilight Translations
Re: Where did you learn assembly from?
« Reply #9 on: August 17, 2017, 10:08:06 pm »
Rodney Zaks' "Programming the 6502" plus a lot of time combing through the docs at NESDev and tinkering in FCEUXD.
Twilight Translations - More than just Dragonball Z. :P

SleepyFist

  • Hero Member
  • *****
  • Posts: 641
    • View Profile
    • Project List - Updated Sometimes
Re: Where did you learn assembly from?
« Reply #10 on: August 19, 2017, 10:09:01 pm »
I'm in the process of learning from the Nerdy Nights tutorial from Nintendo Age (got it backed up to my computer), fun to experiment with too, trying to make optimizations and seeing whether they break or not is fun.
Sleepy's album of the week: MSG - Built to Destroy - https://youtu.be/wj7nJQ_dTNA

STARWIN

  • Sr. Member
  • ****
  • Posts: 428
    • View Profile
Re: Where did you learn assembly from?
« Reply #11 on: August 28, 2017, 11:31:44 am »
I never had to learn how to think in asm, as I already knew C.

Then, for 6502 specifics http://www.obelisk.me.uk/6502/ was perfect, as I didn't have to waste time reading small talk.

flame

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: Where did you learn assembly from?
« Reply #12 on: August 28, 2017, 02:49:13 pm »
For MIPS (PSP R3000), they said go read the MIPS manual.

It doesn't have all the answers there but it has most of them.
www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdf

And then you can use the PPSSPP disassembler to inspect the code at runtime on the PC version.

yugisokubodai

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Re: Where did you learn assembly from?
« Reply #13 on: September 02, 2017, 01:11:12 pm »
I started reading the 65816 around 2009 on the Google and didn't understand a single word.
I'm not a programmer. But I keep reading every year and now I can do something with the Snes and Nes.
I'm also learning Mips and it gives me great help hack PSP games.