2014 NESDev Compo - Guidelines/Rules

Moderator: Moderators

lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: 2014 NESDev Compo - Guidelines/Rules

Post by lidnariq »

Punch wrote:Another thing, I noticed that the emulator mirrors my 16kb bank at the $8000~$BFFF range, that's normal, right?
Yes.

The iNES header format doesn't support files smaller than 16KiB PRG. You could use UNIF instead, but for your purposes there's no real advantage to doing so over padding.
User avatar
NESHomebrew
Formerly WhatULive4
Posts: 418
Joined: Fri Oct 30, 2009 4:43 am
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by NESHomebrew »

FYI, the website has been updated. Everything is a go, good luck. If something doesn't make sense, let me know.
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by infiniteneslives »

Looks great! Good job getting everything together and fully announced.

A few minor comments, do with them as you please.

Registration: I'd recommend explaining that it's non-obligatory, and can be done at any point. There is no deadline to register afaik, just a good idea to do it sooner vice later if you're thinking about making a submission so you can stay in the loop.
Use of existing tools/libraries/code qualify as long as permission has been granted by the author.
What about open source, openly shared code? So long as licensing requirements are upheld, would it not be okay to use especially things like generic libraries and such? Or if someone took a hello world example, or nerdy nights tutorial do we want to discourage things like that?
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by tepples »

If your library is under a free software license, then the license itself is proof that "permission has been granted by the author". For example, anything copied out of Zap Ruder, such as controller and Zapper reading code, is under the GNU Permissive License.
User avatar
Movax12
Posts: 541
Joined: Sun Jan 02, 2011 11:50 am

Re: 2014 NESDev Compo - Guidelines/Rules

Post by Movax12 »

(Not sure if this is the best place to mention this..)
I would like to, but I don't think I will have time in the coming months to be able to finish/submit my own project. But I would like to offer to help with anyone else's project. Anyone that feels they could use some help with programming please let me know/PM me. I'd be happy to be part of a team.
SoleGooseProductions
Posts: 29
Joined: Mon Nov 11, 2013 2:23 pm

Re: 2014 NESDev Compo - Guidelines/Rules

Post by SoleGooseProductions »

infiniteneslives wrote:What about open source, openly shared code? So long as licensing requirements are upheld, would it not be okay to use especially things like generic libraries and such? Or if someone took a hello world example, or nerdy nights tutorial do we want to discourage things like that?
I would hope not, but an answer to this question would be swell. Many of us, I assume, are coming straight off of the NN and have a majority of our code adaptations invested in it. Thanks for any clarification :)
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by blargg »

I just realized that this might be a perfect place to slip in a serial bootloader. PL2303-based USB-TTL-serial adapters are $2 shipped on eBay and can be wired directly to the controller port. Even if there's no cart RAM, small programs can be developed. If this sounds good, I'll update the spec using my current version and we can figure out the details. It'd be a nifty easter egg feature tucked away into 65 bytes of ROM. And if the contest organizers aren't interested, then maybe it can be slipped into one of the entries :)
Last edited by blargg on Fri Jan 10, 2014 10:31 pm, edited 1 time in total.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by tepples »

What you could do is enter an 8K app containing the bootloader and instructions for using it.
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by blargg »

I'm not much into gambling/artificial zero-sum situations, and it's less useful if you have to navigate a menu every time to use it. My thought was hold a particular button on the controller while powering up/resetting to invoke it. If code size is an issue I can probably provide a version under 40 bytes, including controller checking code.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by tepples »

You have a point. Given the whole desktop PC GUI-style theme of the planned menu, I could have this serial bootloader stand in for PXE. Code size is not the issue as much as my own ability to test a transfer. I have an NTSC NES with PowerPak, a Windows 7 PC, and a Linux PC, but no soldering skills.
User avatar
NESHomebrew
Formerly WhatULive4
Posts: 418
Joined: Fri Oct 30, 2009 4:43 am
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by NESHomebrew »

tepples wrote:You have a point. Given the whole desktop PC GUI-style theme of the planned menu, I could have this serial bootloader stand in for PXE. Code size is not the issue as much as my own ability to test a transfer. I have an NTSC NES with PowerPak, a Windows 7 PC, and a Linux PC, but no soldering skills.
I think this would be an excellent addition. I'm glad Blargg thought of this. It would be nice to have some more useful purposes for the GUI other than just look pretty. For example, it would be cool to have it run some hardware tests on the as the "OS" boots up. You brought up detecting peripherals, this would be a cool place to show "Port 2: Zapper Detected", "NTSC Mode", etc.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: 2014 NESDev Compo - Guidelines/Rules

Post by zzo38 »

blargg wrote:I just realized that this might be a perfect place to slip in a serial bootloader. PL2303-based USB-TTL-serial adapters are $2 shipped on eBay and can be wired directly to the controller port.
Which bits of which port? I suggest bit3 and/or bit4 of the second port; this way it is compatible with both NES and Famicom. The bootloader program could also include a BIOS of functions (and an ASCII character set loaded by default in CHR RAM) also used by the main menu; then loaded programs can optionally use this feature.
WhatULive4 wrote:For example, it would be cool to have it run some hardware tests on the as the "OS" boots up. You brought up detecting peripherals, this would be a cool place to show "Port 2: Zapper Detected", "NTSC Mode", etc.
Yes, and perhaps display "Push SELECT for serial bootloader", or "Push gun trigger for serial bootloader" if the Zapper is connected to the first port.

Another question about NESDev Compo in general: If individual programs are extracted for standalone, is the reset vector restored? Is a program allowed to check if the reset vector has been tampered with, and display a "QUIT" option on its menu if so? Would it work?
(Free Hero Mesh - FOSS puzzle game engine)
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by tepples »

zzo38 wrote:Another question about NESDev Compo in general: If individual programs are extracted for standalone, is the reset vector restored?
Yes. The current builder (designed for NROM games) saves the original reset vector in a table in the ROM and restores it when extracting the ROMs. I plan to make the next generation builder (designed for multiple mappers) at least as careful.
Is a program allowed to check if the reset vector has been tampered with, and display a "QUIT" option on its menu if so? Would it work?
It should work. Great idea.
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: 2014 NESDev Compo - Guidelines/Rules

Post by blargg »

zzo38 wrote:
blargg wrote:I just realized that this might be a perfect place to slip in a serial bootloader. PL2303-based USB-TTL-serial adapters are $2 shipped on eBay and can be wired directly to the controller port.
Which bits of which port? I suggest bit3 and/or bit4 of the second port; this way it is compatible with both NES and Famicom. The bootloader program could also include a BIOS of functions (and an ASCII character set loaded by default in CHR RAM) also used by the main menu; then loaded programs can optionally use this feature.
I had it using $4017 bits 4, 2, 1, 0. If I remember correctly (I cannot access all my notes at the moment), bit 0 so you can use a normal NES controller cable, bit 1 if you replace Famicom controller input (or maybe they put input in either), bit 2 is either so you can wire serial to NES internal bus (memblers was going to do this) and possibly on Famicom, and bit 4 is for having two controllers connected and using a modified extension cable for the second port, and maybe also for Famicom. The main danger from more than the minim necessary bits is other hardware that drives them them low when idle.

The bootloader is very minimal, receiving a 256-byte user program to zero-page and checksumming it. Everything else can be done by uploading the appropriate program.

As for invocation, it should be something simple to do with minimal effort. Holding a button on the controller while powering up/resetting is about as minimal as it gets for manual invocation. It should check the controller shortly after reset to avoid having to hold the buttons for more than a moment. It should also check that only the decided-on buttons are held, and no others, to avoid possibility of false triggering if no controller, other controller type, whatever.

Here's what I've got for the bootloader spec and serial cable at the moment, but I haven't looked over it in a while so it may contain minor errors:

Bootloader

Serial cable

I've been using the specified bootloader for a few years, and an earlier variant for many years before that, and it's performed quite well.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: 2014 NESDev Compo - Guidelines/Rules

Post by zzo38 »

OK, yes I believe that can work.
(Free Hero Mesh - FOSS puzzle game engine)
Post Reply