SNES programming Videos

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

SNES programming Videos

Post by Oziphantom »

New programming video, mainly designed for people coming to the SNES for the first time for the Game Jam, but if you have gone through some tutorials already I recommend you watch the 3rd part where I do a deep dive into the traps of doing the NMI routine, and step through and disarm them.

https://youtu.be/rPcwGeX_hLs
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: SNES programming Videos

Post by Nikku4211 »

This is an awesome tutorial.

That being said, is this tutorial supposed to be assembler-agnostic?

If you don't know what that term means, a assembler-agnostic tutorial would theoretically apply to all 6502 assemblers and accommodate all of them.

Since these videos were made for people who have never coded for the SNES before, I think you should have linked them to or at least mentioned some resources on how to assemble with 64tass, the assembler that you recommended.
Last edited by Nikku4211 on Tue Mar 30, 2021 7:47 am, edited 1 time in total.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom »

compiler - translates a high level language into a targets low level language
assembler - converts assembly mnemonics into binary code.

Ultimately this is a theory course, once I get to stack VRAM buffers, I'm going to talk about the theory of operation and not get into 7 screens worth of code line by line. Maybe small snippets of the critical bits, of which should be Assembler agnostic. It was just this 1 very specific and critical part that needed a specific method of which I felt mentioned by the way the '@' is a '.' is other things if your doesn't use '@' covered it.

How and why to use 64Tass with the SNES is for a different series.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: SNES programming Videos

Post by lidnariq »

In an entirely unimportant way, I was kinda amused how you relabeled wikipedia's PAL/NTSC/SECAM diagram to indicate 50 vs 60Hz ... but didn't correct Brazil correspondingly :mrgreen:
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom »

I did think wait check Brazil, and in my "its been 3days I don't want to look at this thing anymore" haze I noticed a lot of green in the area and just though "yep its good".. crap.
KayBur
Posts: 12
Joined: Mon Mar 29, 2021 6:47 am

Re: SNES programming Videos

Post by KayBur »

Can you drop links to the first 2 parts? Very interesting to see. I want to familiarize myself with this programming language just for myself, for the sake of curiosity.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom »

3rd part = the 3rd part of the video not the 3rd video
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: SNES programming Videos

Post by Nikku4211 »

Oziphantom wrote: Mon Mar 29, 2021 9:18 pm Ultimately this is a theory course, once I get to stack VRAM buffers, I'm going to talk about the theory of operation and not get into 7 screens worth of code line by line. Maybe small snippets of the critical bits, of which should be Assembler agnostic. It was just this 1 very specific and critical part that needed a specific method of which I felt mentioned by the way the '@' is a '.' is other things if your doesn't use '@' covered it.
I see.
Oziphantom wrote: Mon Mar 29, 2021 9:18 pm How and why to use 64Tass with the SNES is for a different series.
Okay, still, I think the newbies that this video is made for should get some link in the description to learn how to use assemblers.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom »

well I need to cover the SNES address map and how it relates to the ROM file address map before I go showing how to set up the Assembler.
Which will probably be Ep 3.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: SNES programming Videos

Post by Nikku4211 »

Oziphantom wrote: Tue Mar 30, 2021 8:40 am well I need to cover the SNES address map and how it relates to the ROM file address map before I go showing how to set up the Assembler.
Which will probably be Ep 3.
Oh, okay, that's cool.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: SNES programming Videos

Post by Pokun »

Have to check this out later.

Anyone going with 64tass might benefit from looking at my attempts here (and Oziphantom's and other people's corrections). It should help with setting things up.
KayBur
Posts: 12
Joined: Mon Mar 29, 2021 6:47 am

Re: SNES programming Videos

Post by KayBur »

Oziphantom wrote: Tue Mar 30, 2021 8:40 am well I need to cover the SNES address map and how it relates to the ROM file address map before I go showing how to set up the Assembler.
Which will probably be Ep 3.
I'm looking forward to it. It is very interesting to know, at least in theory, how it works.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: SNES programming Videos

Post by psycopathicteen »

Where did you get the 5.9kB per frame number from?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SNES programming Videos

Post by tepples »

I can hazard a guess:

Each scanline has 1364 clocks, with 40 of those used for WRAM refresh, leaving 1324. DMA takes 8 clocks per byte, giving 165.5 bytes per line.

Each field has 262 lines, with 1 line of prerender, 224 lines of picture, and (262-224-1) = 37 lines of vblank.

165.5 bytes per line * 37 lines per frame = 6123 bytes per frame, or 6123/1024 = 5.98 KiB per frame. Subtract a bit for NMI handling overhead.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: SNES programming Videos

Post by Oziphantom »

What Tepples said, only I went with 1 digit rather than 2 because I figured 5.9 vs 5.98 is neither here nor their difference and its a pure theoretical amount that nobody will actually achieve anyway.
Post Reply