4-way freely-scrolling engine with status bar

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
User avatar
Vectrex2809
Posts: 102
Joined: Mon Jul 14, 2014 6:05 am
Location: Tokyo, Japan

4-way freely-scrolling engine with status bar

Post by Vectrex2809 »

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
scrolldemo.nes
Demo is here :)
(64.02 KiB) Downloaded 414 times
User avatar
Diskover
Posts: 219
Joined: Thu Nov 24, 2011 7:16 am
Contact:

Re: 4-way freely-scrolling engine with status bar

Post by Diskover »

Wow
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: 4-way freely-scrolling engine with status bar

Post by FrankenGraphics »

Speed BLAST PROCESSING!! :shock:
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 4-way freely-scrolling engine with status bar

Post by tokumaru »

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.
User avatar
Vectrex2809
Posts: 102
Joined: Mon Jul 14, 2014 6:05 am
Location: Tokyo, Japan

Re: 4-way freely-scrolling engine with status bar

Post by Vectrex2809 »

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...
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 4-way freely-scrolling engine with status bar

Post by tokumaru »

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.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 4-way freely-scrolling engine with status bar

Post by tepples »

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.
tomaitheous
Posts: 592
Joined: Thu Aug 28, 2008 1:17 am
Contact:

Re: 4-way freely-scrolling engine with status bar

Post by tomaitheous »

What mappers support the "L" mirroring? Or is that something custom?
__________________________
http://pcedev.wordpress.com
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 4-way freely-scrolling engine with status bar

Post by tepples »

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.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: 4-way freely-scrolling engine with status bar

Post by Bregalad »

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.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: 4-way freely-scrolling engine with status bar

Post by FrankenGraphics »

TKSROM is one of infiniteNESlives' "coming soon" items; though the list could benefit from an update or a priority list or pipeline queue.
Post Reply