It is currently Sat Apr 29, 2017 12:36 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Mon Nov 21, 2016 7:52 pm 
Offline
User avatar

Joined: Mon Jul 14, 2014 6:05 am
Posts: 78
Location: Lausanne, Switzerland
So I just mostly finished coding this 4-way, freely scrolling engine that I'll probably use in a game later on.
For now, I just wanted to show this off to my fellow NES developers :)

There might be a few attribute issues, as well as having the actual scrolling taking a long time to execute (Press select to see the runtime. It's been only half-optimized, ha!), but I believe this is decent enough to show off without it looking like a completely unfinished mess.
Oh, and it even has a status bar :D

DL link is attached to this post. Let me know if you have any feedback ^^


Attachments:
File comment: Demo is here :)
scrolldemo.nes [64.02 KiB]
Downloaded 138 times
Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 9:04 am 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 125
Wow


Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 9:40 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 372
Location: Gothenburg, Sweden
Speed BLAST PROCESSING!! :shock:

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 12:49 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 9553
Location: Rio de Janeiro - Brazil
Cool looking demo. The technique you're using for the status bar reminds me of the status bar in The Jungle Book. Having to redraw the status bar all the time is something that doesn't sit well with me, though. You're using horizontal mirroring, right? This means you have attribute artifacts at the side(s) of the screen when scrolling, so you could achieve the exact same effect if you used 1-screen mirroring and had the gameplay and the status bar each in a separate name table, so you wouldn't need to keep redrawing the status bar to dodge the scroll.


Last edited by tokumaru on Tue Nov 22, 2016 1:26 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 1:24 pm 
Offline
User avatar

Joined: Mon Jul 14, 2014 6:05 am
Posts: 78
Location: Lausanne, Switzerland
tokumaru wrote:
Cool looking demo. The technique you're using for the status bar reminds me of the status bar in The Jungle Book. Having to redraw the status bar all the time is something that doesn't sit well with me, though. You're using horizontal mirroring, right? This means you have attribute artifacts at the side(s) of the screen when scrolling, so you could achieve the exact same effect if you used 1-screen mirroring and had the gameplay and the status bar each in a separate name table, so you wouldn't need to keep redrawing the status bar to dodge the scroll.


I got inspired by The Jungle Book indeed ;)
Attribute artifacts are definitely an unavoidable problem here, and I thought about doing it alla Crystalis for a while, especially since I'm using MMC3 for the IRQs, but I ultimately ended up doing it Jungle Book style. Just a matter of personal preference I guess...


Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 1:26 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 9553
Location: Rio de Janeiro - Brazil
If I'm not mistaken, The Jungle Book users vertical mirroring, so getting a scrolling window plus a status bar in just 30 tiles of vertical space is a very tight fit, but I believe the game gets away with it by blanking part of the screen. The biggest advantage is that there are no attribute artifacts at all when scrolling.

You can also get rid of the attribute artifacts if you use a cartridge containing VRAM for 4 screens. You'd still have to redraw the status bar sometimes, or skip it using IRQs.


Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 1:39 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18212
Location: NE Indiana, USA (NTSC)
This demo uses MMC3, whose standard boards don't support 1-screen mirroring. It also uses WRAM at $6000. TLSROM (mapper 118, MMC3 with A10 out = CHR A17) supports arbitrary mirroring, but unlike TSROM and TKROM, TLSROM has no WRAM at $6000. TKSROM (mapper 118 with battery RAM) supports both 1-screen mirroring and battery RAM, but it isn't very Ys-y to find a game using that board. (Only its Super NES port made it across the Pacific.)

One optimization suggestion for this general technique of moving the status bar back and forth: Use only the last two rows of each nametable ($2380-$23BF) for the status bar so that you don't have to redraw it quite as often.

Another optimization suggestion, specific to MMC3 or other mappers with an interval timer: Set the timer to when scanline 223 of the nametable is about to be rendered, so that you can wrap around to Y=0 in software just before line 224. That way:
  1. You can keep the status bar at Y=224 ($2380) without needing to redraw anything.
  2. You get a plane that's 7 attribute rows tall instead of 7 1/2, making camera control somewhat simpler especially with your 32x32 pixel metatiles.
  3. You can arrange the nametable horizontally (vertical mirroring) to completely eliminate the attribute clash on the trailing edge.


Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 3:27 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
What mappers support the "L" mirroring? Or is that something custom?

_________________
__________________________
http://pcedev.wordpress.com


Top
 Profile  
 
PostPosted: Tue Nov 22, 2016 4:06 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18212
Location: NE Indiana, USA (NTSC)
Only two mappers that I'm aware of have L-shaped mirroring as a distinct mode: Sachen 374N and Sachen 8259. Anything that allows assigning a separate A10 out value for each combination of PA10 and PA11 in also supports L-shaped mirroring, such as TLSROM, MMC5, and Namco 163.


Top
 Profile  
 
PostPosted: Wed Nov 23, 2016 12:09 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7015
Location: Jongny, VD, Switzerland
tepples wrote:
This demo uses MMC3, whose standard boards don't support 1-screen mirroring. It also uses WRAM at $6000. TLSROM (mapper 118, MMC3 with A10 out = CHR A17) supports arbitrary mirroring, but unlike TSROM and TKROM, TLSROM has no WRAM at $6000. TKSROM (mapper 118 with battery RAM) supports both 1-screen mirroring and battery RAM, but it isn't very Ys-y to find a game using that board. (Only its Super NES port made it across the Pacific.)

I have yet to be able to see the demo, but I see no reason for not using TKSROM equivalent if one would like to. It can be easily supported on flash carts, and if there is a need to test from a Nintendo board it's just a single wire change from TSROM or TKROM.


Top
 Profile  
 
PostPosted: Wed Nov 23, 2016 5:00 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 372
Location: Gothenburg, Sweden
TKSROM is one of infiniteNESlives' "coming soon" items; though the list could benefit from an update or a priority list or pipeline queue.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group