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

0 users currently in SMW Hacking | 2 guests | 1 bot

Main - SMW Hacking - SNES Programming Guide New thread | New reply


cory21391
Posted on 07-25-07 10:01 PM Link | Quote | ID: 57921


Flurry
Level: 37

Posts: 51/260
EXP: 331945
Next: 6308

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

Last post: 5131 days
Last view: 5131 days
well, I'm creating an all-in-one programming guide to explain the basics of SNES Programming (65816, vram, cgram, dma, etc, etc), cover a lot of stuff for begginers and explains things from the ground up. It will come in 4 sections with some tools in a zip file. I'm done with Section 1: 65816 Programming and working on Section 2: Displaying graphics. Is this a good idea? Of course, it would need to be proofread, and, yea... How does this name sound "The Super Jumbo Extremely Long Yet Informative Begginer's Guide to SNES Programming and Stuff" lol jk

____________________




xineohPK
Posted on 07-26-07 03:42 AM Link | Quote | ID: 58045


Paragoomba
Level: 21

Posts: 40/67
EXP: 43453
Next: 6490

Since: 02-20-07
From: Wisconsin, U.S.

Last post: 5759 days
Last view: 5562 days
[citation needed]

____________________
LINKS
KPhoenix SMW ROMHacking
KPhoenix
Send Message
Show Posts

Erika
Posted on 07-26-07 04:19 AM Link | Quote | ID: 58070


Paratroopa
Level: 29

Posts: 70/150
EXP: 145574
Next: 2311

Since: 02-19-07
From: Shibuya

Last post: 5929 days
Last view: 5540 days
[citation needed]

smkdan
Posted on 07-26-07 07:23 AM Link | Quote | ID: 58195


Ninji
Level: 36

Posts: 65/238
EXP: 288718
Next: 19392

Since: 05-26-07

Last post: 4065 days
Last view: 4014 days
You can find the official manual at romhacking.net

http://www.romhacking.net/docs/225/

Yes, it's pretty hefty. Those bookmarks come in handy.

Erika
Posted on 07-26-07 07:48 PM Link | Quote | ID: 58449


Paratroopa
Level: 29

Posts: 71/150
EXP: 145574
Next: 2311

Since: 02-19-07
From: Shibuya

Last post: 5929 days
Last view: 5540 days
Ooooh...that's different from mine. Mine is even much larger and appears to be made by Nintendo of America (and even covers rudimentary SPC functionality, among other things). Still a neat read

cory21391
Posted on 07-26-07 08:42 PM Link | Quote | ID: 58471


Flurry
Level: 37

Posts: 53/260
EXP: 331945
Next: 6308

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

Last post: 5131 days
Last view: 5131 days
well, the official nintendo SNES manual is easy to understand at first, then when you start getting into diagrams of stuff it's not so easy to understand (for me anyways) well, if anyone wants to proofread the 1st 2 sections (all about the 65816 and graphic tiles, vram, cgram, dma, and screen modes) just pm me and i'll send it away. the 1st section is the 65816, the 2nd is the rest.

____________________




smkdan
Posted on 07-26-07 10:55 PM (rev. 2 of 07-26-07 11:02 PM) Link | Quote | ID: 58533


Ninji
Level: 36

Posts: 66/238
EXP: 288718
Next: 19392

Since: 05-26-07

Last post: 4065 days
Last view: 4014 days
I mixed up the names...that one was for the SFC. This one is for the SNES. I didn't download the SFC one, but the SNES one is in english anyway. The explanations can be confusing sometimes but its still a comprehensive source.

http://www.romhacking.net/docs/226/

Edit: Why are posts being randomly destroyed with 'citation needed'?

cory21391
Posted on 07-28-07 10:36 PM Link | Quote | ID: 59214


Flurry
Level: 37

Posts: 58/260
EXP: 331945
Next: 6308

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

Last post: 5131 days
Last view: 5131 days
dl links for those interested. If you have any questions or corrections, pm me.

Part 1: The 65816
http://www.mediafire.com/?9emxnx0myxc

Part 2: Displaying Graphics
http://www.mediafire.com/?cfgsj04ijiu

____________________




smkdan
Posted on 07-29-07 02:53 AM Link | Quote | ID: 59257


Ninji
Level: 36

Posts: 67/238
EXP: 288718
Next: 19392

Since: 05-26-07

Last post: 4065 days
Last view: 4014 days
The SNES does have multiply / divide built in, just not as instructions. Look at $4202 in anomie's regs.txt. It's all explained in that area.

If you're working with multiplying / dividing numbers in powers of two, bitshifts are the ideal choice. If you want to multiply by say, a fixed amount of 5, however, software is still viable. If you have a number you want to multiply at $0123...


REP #$20
LDA $0123
ASL A ; x2
ASL A ; x4
CLC
ADC $0123 ; x5


You'd weigh up the speed of using the hardware multiply / divide against the software alternative. If you're using variable multiplier / divisors you'd always use the hardware option I guess.

Ailure
Posted on 07-29-07 03:00 AM Link | Quote | ID: 59259

Hats
Steam Board2 group
Level: 121

Posts: 1345/3965
EXP: 19783775
Next: 272921

Since: 02-19-07
From: Sweden, Skåne

Last post: 3304 days
Last view: 2055 days
Pretty good guide as far I can tell, although then i'm rather comfortable with assembly programming in general. I might try to make something out of this, I programmed 6502 in the past and even made a simple NES program, but never tried to make anything for the SNES.

____________________
AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org


cory21391
Posted on 07-31-07 12:22 AM Link | Quote | ID: 59625


Flurry
Level: 37

Posts: 59/260
EXP: 331945
Next: 6308

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

Last post: 5131 days
Last view: 5131 days
wow, i've never heard of multiplying/dividing with the snes. actually i read somewhere that you can't without loops/inc-ing a lot. but oh well, not to important, i'll fix it though, when i finish the sprites/input section and the advanced programming section that is....

____________________




MathOnNapkins
Posted on 08-02-07 06:48 PM Link | Quote | ID: 59720


Super Koopa
Level: 62

Posts: 183/842
EXP: 1935965
Next: 48721

Since: 02-19-07
From: durff

Last post: 4491 days
Last view: 4014 days
Posted by smkdan
The SNES does have multiply / divide built in, just not as instructions. Look at $4202 in anomie's regs.txt. It's all explained in that area.

If you're working with multiplying / dividing numbers in powers of two, bitshifts are the ideal choice. If you want to multiply by say, a fixed amount of 5, however, software is still viable. If you have a number you want to multiply at $0123...


REP #$20
LDA $0123
ASL A ; x2
ASL A ; x4
CLC
ADC $0123 ; x5


You'd weigh up the speed of using the hardware multiply / divide against the software alternative. If you're using variable multiplier / divisors you'd always use the hardware option I guess.



Who needs memory addresses when you have a stack?

PHA
ASL A
ASL A
CLC
ADC $01, S
STA $01, S
PLA


In one case I saved a couple cycles and negated the need for a memory address and an indexing register by using stack relative operations such as above

As for multiplication and division, I suppose if you have the space in the rom it's probably faster to use a lookup table. For some operations it might take up a bank or two, though.



____________________
Zelda Hacking Forum
hobbies: delectatio morosa

Main - SMW Hacking - SNES Programming Guide New thread | New reply

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

Page rendered in 0.028 seconds. (341KB of memory used)
MySQL - queries: 87, rows: 119/119, time: 0.017 seconds.