Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,529,750
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-04-24 06:51 AM
Guest: Register | Login

0 users currently in SMW Hacking | 1 guest

Main - SMW Hacking - MarcTheMer's asm tutorial New thread | New reply


cory21391
Posted on 05-26-07 09:00 PM Link | Quote | ID: 38687


Flurry
Level: 37

Posts: 18/260
EXP: 332074
Next: 6179

Since: 03-01-07
From: NC, US

Last post: 5136 days
Last view: 5136 days
I heard it was a good start for asm begginers, but i cant find it anywhere.
Does anyone here have a copy of it or a link to it?
If its a word file send it to cory21391@yahoo.com, or a working link would be fine.
I'm trying to learn REAL snes asm (saved a bunch of word files from wiki and vintagedev.tehskeen.com)

____________________




NightKev
Posted on 05-27-07 03:02 AM Link | Quote | ID: 38743


Cape Luigi
Level: 131

Posts: 935/4792
EXP: 26246452
Next: 178168

Since: 03-15-07

Last post: 3742 days
Last view: 3654 days
There's also a thread here --> ASM Thread

____________________

cory21391
Posted on 05-29-07 07:23 PM Link | Quote | ID: 39400


Flurry
Level: 37

Posts: 20/260
EXP: 332074
Next: 6179

Since: 03-01-07
From: NC, US

Last post: 5136 days
Last view: 5136 days
yea i think i understand most of 65816 asm (except what the actual interrupts do and how to use them, i know the definition of an 'interrupt')

i really need help with graphics (VRAM, CGRAM, and DMA)

URG, i dont get it!!!

i THINK i understand palettes and 8x8tiles, but im not 100% clear.

heres my interpretation of 8x8 tiles and colors/palettes.

$2120 (turn the screen on or force an H or V blank)
$2121 (Load the color #, which i assume (SINCE ITS 1BYTE) is color 0-F are from palette 0, color 10-1F are from palette 1, etc..)
$2122 (double write; write the 1st byte of color then the second byte in 0bbb bbgg gggr rrrr format)

8x8 tiles:
a 2bpp tile uses 2 bits per pixel (0, 1 , 0 ,1) so you can have 4 total colors. and each word represents 1 line of 8 pixels. so... i think you have to read each byte in order from low order to high order, like reading binary, if im right then... 4bpp is:

color: 0 1 2 3 4...etc so color... 13 14 15

byte 1: 1 place- 0 1 0 1 0 1 0 1
byte 2: 2 place- 0 0 1 1 0 0 1 1
byte 3: 4 place- 0 0 0 0 1 1 1 1
byte 4: 8 place- 0 0 0 0 0 1 1 1

and then you put the bits corresponding to the 8 pixels in the first row.

so, to have 1 8 pixel long row using 2bpp, making each pixel alternate between color 1 and 2...

%10101010, %01010101

right? just needed to clarify about the tiles/colors/palettes. is this right?

and i still need help with moving the tiles to the screen, the screen modes, VRAM, and DMA... bleh....

____________________




MathOnNapkins
Posted on 06-06-07 03:56 AM Link | Quote | ID: 42808


Super Koopa
Level: 62

Posts: 154/842
EXP: 1936716
Next: 47970

Since: 02-19-07
From: durff

Last post: 4496 days
Last view: 4019 days
Pretty good for you to have learned this much on your own. Everything except perhaps your understanding of the 4bpp format seems dead on.

*Note* I've renumbered the bytes from 0-3 instead of 1-4, it's much more common in programming to think with 0 as the initial element.

byte 0: 1 place- 0 1 0 1 0 1 0 1
byte 1: 2 place- 0 0 1 1 0 0 1 1
byte 2: 4 place- 0 0 0 0 1 1 1 1
byte 3: 8 place- 0 0 0 0 0 1 1 1


^ A 4bpp tile is 0x20 bytes (double that of a 2bpp tile). You've almost got this right. Except it's not byte 2 and byte 3 that hold the 4 and 8 place (respectively).

It's bytes 0x10 and 0x11:

XX YY
ZZ WW

So if you're viewing 4bpp data it's easier to look at it as a "square" of 4 bytes.

I'd recommend a document like Anomie's register doc at romhacking.net. Qwertie's PPU document is also good, but outdated and possibly wrong in a few sections. You could also PM if you get stuck. Looking at existing roms using Geiger's Debugger (BSNES might also be good but I haven't used its debugger yet) is also a good way to figure out DMA, HDMA, and things like OAM and CGRAM.

____________________
Zelda Hacking Forum
hobbies: delectatio morosa

Main - SMW Hacking - MarcTheMer's asm tutorial New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (339KB of memory used)
MySQL - queries: 52, rows: 75/76, time: 0.016 seconds.