What do we want in a tutorial?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
Kasumi
Posts: 1292
Joined: Wed Apr 02, 2008 2:09 pm

Re: What do we want in a tutorial?

Post by Kasumi » Thu Aug 13, 2015 4:52 pm

That's already suggested in this post.

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3503
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: What do we want in a tutorial?

Post by Drew Sebastino » Thu Aug 13, 2015 5:08 pm

Kasumi wrote:I've actually considered making an interactive rom like that to explain the restrictions to pixel artists.
That kind of reminds me of a really cool Neo Geo rom, where you can alter the sprites by moving them around and shrinking them and liking them to other sprites and whatnot.

Image

You know, one thing that would be really cool is if somebody did this on the SNES, but took it a step further buy allowing you to edit vram and change video modes and everything. There'd be like a screen for editing cgram, a screen for editing vram, a screen for editing the information regarding sprites and BGs, like where sprites and BGs start in vram and the video mode used, and a screen where the actual display is, where you can move the sprites and the BGs around. I think that would be kind of cool, and it would especially be cool if you could actually save the picture in SNES mode (it just saves all the information) and save the picture in a picture file that you view on your computer. (Off course, you'd need to be able to connect it in some way.) One thing that would be a bit of a problem is if you're editing every aspect of the video hardware, there'd be no more room left for saying what any of the controls or anything, (The Neo Geo demo uses the fix layer for this) but you could always have it to where there's another menu that just displays the controls.

tepples
Posts: 22017
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: What do we want in a tutorial?

Post by tepples » Fri Aug 14, 2015 10:39 am

Sik wrote:
tepples wrote:And which text editor? I use gedit 2 on Xubuntu 14.04 (a Debian derivative), but gedit 3's "new face" without a menu bar scares me.
Yet this is what I have somehow (the only serious difference is that the preferences dialog is in the taskbar and not the menubar, and that's something you'd rarely touch anyway). gEdit 3.10.4 on Gnome in Classic mode.
Did it change between 3.10.4 and 3.11.92, when this screenshot was taken of the UI that people complain about? Or what is "classic mode"?

Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: What do we want in a tutorial?

Post by Sik » Fri Aug 14, 2015 4:04 pm

tepples wrote:Or what is "classic mode"?
Gnome 3 has a mode where it gimmicks the UI from Gnome 2. It's not an exact replica, but for the most part it's similar. I haven't checked how gEdit looks outside classic mode so take that into account.

psycopathicteen
Posts: 2936
Joined: Wed May 19, 2010 6:12 pm

Re: What do we want in a tutorial?

Post by psycopathicteen » Sat Aug 15, 2015 9:30 am

Some code examples for a SHMUP tutorial:

Moving an object:

Code: Select all

lda x_position_lo,x
clc
adc x_velocity_lo,x
sta x_position_lo,x

lda x_position_hi,x
adc x_velocity_hi,x
sta x_position_hi,x

lda y_position_lo,x
clc
adc y_velocity_lo,x
sta y_position_lo,x

lda y_position_hi,x
adc y_velocity_hi,x
sta y_position_hi,x
Drawing a sprite

Code: Select all

ldy oam_pointer

lda y_position_hi,x
sta oam,y

lda name,x
sta oam+1,y

lda attributes,x
sta oam+2,y

lda x_position_hi,x
sta oam+3,y

tya
clc
adc #$04
sta oam_pointer

Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: What do we want in a tutorial?

Post by Sik » Sat Aug 15, 2015 11:34 am

I would make sure to add comments to each portion (at the side, no need to be on their own lines) to make sure it's more readable to those who aren't that well versed in 6502 assembly yet.

I like how tidy those snippets look though =P

EDIT: how it'd look with comments (I know there's some redundancy but it's needed to counter assembly being harder to read):

Code: Select all

    lda x_position_lo,x         ; Apply horizontal speed
    clc
    adc x_velocity_lo,x
    sta x_position_lo,x

    lda x_position_hi,x
    adc x_velocity_hi,x
    sta x_position_hi,x

    lda y_position_lo,x         ; Apply vertical speed
    clc
    adc y_velocity_lo,x
    sta y_position_lo,x

    lda y_position_hi,x
    adc y_velocity_hi,x
    sta y_position_hi,x

Code: Select all

    ldy oam_pointer             ; Where this sprite will go

    lda y_position_hi,x         ; Store the sprite properties
    sta oam,y                     ; 1st byte = vertical position
    lda name,x                    ; 2nd byte = tile to use
    sta oam+1,y                   ; 3rd byte = palette and flip
    lda attributes,x              ; 4th byte = horizontal position
    sta oam+2,y
    lda x_position_hi,x
    sta oam+3,y

    tya                         ; Calculate offset for next sprite
    clc
    adc #$04
    sta oam_pointer
Last edited by Sik on Sat Aug 15, 2015 11:38 am, edited 1 time in total.

User avatar
tokumaru
Posts: 11751
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: What do we want in a tutorial?

Post by tokumaru » Sat Aug 15, 2015 11:37 am

psycopathicteen wrote:Drawing a sprite
Are objects represented by a single sprite?

Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: What do we want in a tutorial?

Post by Sik » Sat Aug 15, 2015 11:39 am

tokumaru wrote:
psycopathicteen wrote:Drawing a sprite
Are objects represented by a single sprite?
It could be a generic AddSprite subroutine =P (although I'd add a check to ensure it won't draw too many sprites... actually thinking on it, it'd just wrap around and overwrite the earliest sprites, right?)

mikaelmoizt
Posts: 120
Joined: Sat Apr 12, 2014 12:11 pm
Location: Gothenburg, Sweden

Re: What do we want in a tutorial?

Post by mikaelmoizt » Sun Aug 16, 2015 7:22 am

Hey, here is a thread I forgot.

*Putting "even more n00b than I actually am" glasses on.*

I just downloaded Python to install onto my Windows PC.
I've been told that there are basically 2 different versions, where one is for "legacy" support, and one is for "teh futare" or something.
(Apart from that, there are different sub versions of the two different versions. I guessed highest numbers = newest and better.)

I got both packages just in case (I mean really, how should I know?), installed them and everything went fine.
If I double click that executable named python.exe a black box pops up and disappears quickly.
So this must be a command line driven compiler/interpreter.

Next, I tried to compile a piece of code from tepples Project template.

ImportError: No module named PIL

Um. So.. okay. I guess I go to that dev forum to see if someone can help me with that. (...)
Ah, there it is. I need to download some sort of library thing.
And so I did find some stuff to download, but it now says I don't have the right version of Python (...not installed... register...blah..)
Wait.. this is some old stuff from 2009.. that can't be right.

Alright, so now I need something named Pillow. Is it related to resting your head on something?
Hmm.. there are a lot of files to choose from. I finally ended up with Pillow-2.9.0.win32-py3.4.exe and it finally looks like it works! (*)

*Taking "even more n00b than I actually am" glasses off.*

Now.. excuse my TL;DR approach of this post, but you all kind of see the problem with all this? There are a lot of things to intimidate a n00b here without guidance :D
So yeah, a tutorial on this + all the rest of the tool chain would be nice and save a lot of grief. What to get, how to get, where to get and what to do.

@tepples : you can start writing tools and setup related stuff (if not already started?) so we at least get going somewhere.

Let's start here.

(*) For the record, working with command lines, installing packages, configuring my editor, and getting libraries are not something I am not familiar with, so for me it was pretty straight forward.
I´ve got %01100011 problems but the BITs aint one.

tepples
Posts: 22017
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: What do we want in a tutorial?

Post by tepples » Sun Aug 16, 2015 7:53 am

mikaelmoizt wrote:I've been told that there are basically 2 different versions, where one is for "legacy" support, and one is for "teh futare" or something.
Right now, the scripts are designed for Python 2, which is the "legacy" version. (When I started writing them, there were serious practical problems with using Python 3 on Windows that weren't resolved until the release of Python 3.3.) But by the time I actually start the tutorial, I plan to port everything to Python 3.
If I double click that executable named python.exe a black box pops up and disappears quickly.
So this must be a command line driven compiler/interpreter.
On your Start menu, there should be a program called IDLE. This is the Tk-based graphical front end to Python.
Alright, so now I need something named Pillow. Is it related to resting your head on something?
Python Imaging Library changed its name to "Pillow" after a new maintainer took over. I'm not sure the "low" part stands for anything.

mikaelmoizt
Posts: 120
Joined: Sat Apr 12, 2014 12:11 pm
Location: Gothenburg, Sweden

Re: What do we want in a tutorial?

Post by mikaelmoizt » Mon Aug 17, 2015 2:04 am

tepples wrote: On your Start menu, there should be a program called IDLE. This is the Tk-based graphical front end to Python.
Ah. I see. Thanks.

I really like the help file. It contains a tutorial and covers a lot of other stuff as well. THAT part was really newbie friendly.
I´ve got %01100011 problems but the BITs aint one.

User avatar
dougeff
Posts: 2710
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: What do we want in a tutorial?

Post by dougeff » Thu Aug 20, 2015 4:24 pm

I was thinking... If Nerdy Nights was written in C rather than ASM, I would have had an easier time following it. Maybe more people would get into NES programming if the tutorials were in a more common language, like C.
nesdoug.com -- blog/tutorial on programming for the NES

lidnariq
Posts: 9499
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: What do we want in a tutorial?

Post by lidnariq » Thu Aug 20, 2015 4:41 pm

C is not a great fit for the 6502, so you'll need to understand the 6502 a bit first, but such a guide has already been written: http://shiru.untergrund.net/articles/pr ... s_in_c.htm

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3503
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: What do we want in a tutorial?

Post by Drew Sebastino » Thu Aug 20, 2015 4:43 pm

How many people even know any language before starting NES dev? I didn't know anything before attempting to work on the SNES, which I constantly heard was "too hard" for a first platform. I'd say it's just better to get used to assembly, because it's the best option in terms of performance.

mikaelmoizt
Posts: 120
Joined: Sat Apr 12, 2014 12:11 pm
Location: Gothenburg, Sweden

Re: What do we want in a tutorial?

Post by mikaelmoizt » Thu Aug 20, 2015 5:04 pm

dougeff wrote:I was thinking... If Nerdy Nights was written in C rather than ASM, I would have had an easier time following it. Maybe more people would get into NES programming if the tutorials were in a more common language, like C.
Maybe that would be a good idea for some people, just to 'get a feeling'. However, I really can't think of a more basic and easy way of doing load, store, compare, subtract and add things than by using three letter mnemonics.
I´ve got %01100011 problems but the BITs aint one.

Post Reply