NES Screen Tool

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

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

Re: NES Screen Tool

Post by lidnariq » Thu Nov 07, 2013 4:01 pm

NES Screen tool makes it easier to draw a screen for the NES, or set of screens.

To actually display on a NES, you will still need a little bit of program, but it's a task that could easily be done using cc65.

User avatar
rainwarrior
Posts: 7823
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: NES Screen Tool

Post by rainwarrior » Thu Nov 07, 2013 4:02 pm

caramelpuffpuff it is just a very nice tool for making NES screens. The nicest, actually.

It's not "needed"; there are lots of ways to make an NES screen. For example, some people just type nametables out as hex numbers in the assembly code. Shiru's tool is really convenient though, since it already obeys all the NES rules.

User avatar
caramelpuffpuff
Posts: 64
Joined: Sat Feb 23, 2013 4:16 pm

Re: NES Screen Tool

Post by caramelpuffpuff » Thu Nov 07, 2013 5:17 pm

RainyHero, so is this tool, "universal-usage" or "exclusive-usage", which is only use for certain games only, like SMB3 tools? And is this tool usable to everything I'd use it on, like title screen, background, game-over, stages, selection, etc? Or it has limitations/more than I said?
I am thinking of requesting a tutor [free] to learn NES programming in 6502 Assembly, as I am still baffled on the Bunnyboy 6504 lessons. If anyone want to help, I'm happy.
Bear in mind I may act silly or have trouble understanding, so please bear with me.

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

Re: NES Screen Tool

Post by tepples » Thu Nov 07, 2013 6:00 pm

It can be used on any screen, but some things related to nametables (such as collision or heavy compression) are best done with specialized tools.

User avatar
caramelpuffpuff
Posts: 64
Joined: Sat Feb 23, 2013 4:16 pm

Re: NES Screen Tool

Post by caramelpuffpuff » Thu Nov 07, 2013 6:35 pm

Is nametable the "entire group" of sprites and graphics and backgrounds? Or the is term is different?
I am thinking of requesting a tutor [free] to learn NES programming in 6502 Assembly, as I am still baffled on the Bunnyboy 6504 lessons. If anyone want to help, I'm happy.
Bear in mind I may act silly or have trouble understanding, so please bear with me.

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

Re: NES Screen Tool

Post by lidnariq » Thu Nov 07, 2013 6:37 pm

"pattern table" is the term for the group of small 8x8 pixel pictures that are combined to make sprites and backgrounds.

Name table is the term for the list of numbers that say what pattern table pattern is drawn where in the background.
Last edited by lidnariq on Thu Nov 07, 2013 6:39 pm, edited 1 time in total.

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

Re: NES Screen Tool

Post by tepples » Thu Nov 07, 2013 6:39 pm

A background consists of three parts of video memory: the pattern table ($0000-$0FFF), the nametable ($2000-$23FF), and the palette ($3F00-$3F0F). The pattern table is the 256 tiles, the nametable is a 32x30-tile map plus a 16x15-area coloration map that tells which part of the palette each 2x2 block of tiles uses. Sprites use OAM (a separate memory space) and typically use the other pattern table ($1000-$1FFF).

User avatar
caramelpuffpuff
Posts: 64
Joined: Sat Feb 23, 2013 4:16 pm

Re: NES Screen Tool

Post by caramelpuffpuff » Thu Nov 07, 2013 6:44 pm

Oooooooooooooh. So nametable it's a file-code to organize on what sprites and background it appears and what does not.
I am thinking of requesting a tutor [free] to learn NES programming in 6502 Assembly, as I am still baffled on the Bunnyboy 6504 lessons. If anyone want to help, I'm happy.
Bear in mind I may act silly or have trouble understanding, so please bear with me.

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NES Screen Tool

Post by darkhog » Wed Nov 13, 2013 6:28 pm

Could you add export for nametable as .asm text file with .byt/.db instructions? I've found out that easiest method to put nametable into memory is to divide it into 6 "segments", each of 5 rows so we can load it each by 160 bytes with 6 loops, like this:

Code: Select all

loop:
   lda face,y
   sta PPUDATA
   iny
   sty $A1
   lda $A1
   cmp #160
   bne loop
   ldy #00
   loop2:
   lda face2,y
   sta PPUDATA
   iny
   sty $A1
   lda $A1
   cmp #160
   bne loop2
   ldy #00
  ;snip for rest of loops as they are largely same
To do that, I need to put symbols (labels) every 5 rows of nametable, so I need text output (hex numbers) instead of binary (.nam files).

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

Re: NES Screen Tool

Post by Kasumi » Wed Nov 13, 2013 6:41 pm

You could split the binary file yourself using python/whatever other languages you know, or just add 160 to the pointer each time in 6502.

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

Re: NES Screen Tool

Post by tepples » Wed Nov 13, 2013 6:42 pm

You can copy a whole nametable from one label with (d),Y addressing mode. Load a pointer into two adjacent zero page locations, increase Y after each byte, and when Y wraps, increase the high byte of the pointer.

Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: NES Screen Tool

Post by Shiru » Wed Nov 13, 2013 6:55 pm

It is already possible, sans nametable attributes - just select the whole nametable, then Nametable/Put selection to clipboard as ASM.

Also, you can normally define labels as an absolute address or an expression, so you probably can just do something like

Code: Select all

part1
part2=part1+160
part3=part2+160
...
 incbin "nametable.bin"

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NES Screen Tool

Post by darkhog » Thu Nov 14, 2013 3:20 am

tepples wrote:You can copy a whole nametable from one label with (d),Y addressing mode. Load a pointer into two adjacent zero page locations, increase Y after each byte, and when Y wraps, increase the high byte of the pointer.
Yeah, but my way is easier (and until it makes game too slow I'll keep it)

@Shiru: Thanks, will try that!

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: NES Screen Tool

Post by thefox » Thu Nov 14, 2013 8:41 am

darkhog wrote:

Code: Select all

  ;snip for rest of loops as they are largely same
And this is when you should use macros. On ca65, you can even use macros to generate the labels Shiru was talking about.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NES Screen Tool

Post by darkhog » Sat Nov 16, 2013 9:30 am

thefox wrote:
darkhog wrote:

Code: Select all

  ;snip for rest of loops as they are largely same
And this is when you should use macros. On ca65, you can even use macros to generate the labels Shiru was talking about.
Shutup, I'm still learning ;).

Anyway, I suppose I'll eventually convert it into macro as I am big fan of code reuse, but first I want to make something that works. Then I will learn how to do it properly, but so it'd still be working.

Post Reply