It is currently Mon Nov 20, 2017 9:30 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Wed Jan 11, 2012 2:16 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
To make up for there being no multicart for the 2011 NESdev compo, I'm working on rewriting the menu system so that we can include the NROM entries from both last year's and this year's, as soon as I can drag myself away from Cracked.


Last edited by tepples on Fri Jan 13, 2012 6:06 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2012 2:30 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3950
Need to drag yourself away from Cracked? Try TvTropes.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2012 2:33 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
That's something I wanted to add too. Making carts shouldn't take long at all, I mean Tepples engine probably isn't too bad to add games too, I don't see why it didn't get put together last year. At the least make it work on something like MMC1 and commission a repro maker to make the games.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2012 2:56 pm 
Offline
User avatar

Joined: Sun Sep 07, 2008 7:27 am
Posts: 488
Location: Seatlle, WA, USA
Dwedit wrote:
Need to drag yourself away from Cracked? Try TvTropes.


Ha Ha Ha!!!!! Nice.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2012 4:27 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
Dwedit wrote:
Need to drag yourself away from Cracked? Try TvTropes.

Way ahead of you, brother.

Q: It takes two to
  1. tango
  2. mango
  3. make an accident
  4. make a multicart
  5. make a thing go right
  6. make it out of sight
  7. all of the above

A:
Image

Imagine it being as easy to build a multicart of NROM games as it currently is to build a PocketNES image.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2012 10:43 pm 
Offline
Formerly WhatULive4
User avatar

Joined: Fri Oct 30, 2009 4:43 am
Posts: 338
Nice work Tepples! I don't want to write off the CompoCart yet, but I don't see why they couldn't be on both.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2012 1:27 pm 
Offline

Joined: Wed Feb 17, 2010 5:42 pm
Posts: 359
Location: Denine's Devil Mansion
53 NROM games on one cart? :shock:
That's a really BIG amount.
Nice work, Tepples!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2012 2:21 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3950
Does BNROM guarantee that the first page will be swapped in at reset, or does every page need reset code?

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2012 6:08 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3484
Location: Indianapolis
I believe it could start in any bank. But another consideration, is that we can't know what bank it will be in the when the user hits reset - you'll always want some kind of reset vector available.

Because it uses the '161 which has a /clear input, I suppose it would have been possible to put an RC circuit (resistor-capacitor) on that, charged by Phi2 (M2). Kinda sucks I didn't consider that when I did the board layout, but oh well, it's only slightly annoying to add a bunch of 8-byte segments into LD65's configuration (8 bytes should be enough for mapper reset and JMP).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2012 7:53 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
Memblers wrote:
8 bytes should be enough for mapper reset and JMP

I imagine you'll have to replace every game's reset vector by the address of this 8-byte sequence as well. Could this possibly be a problem? I don't think many games use their reset vectors for strange purposes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2012 8:12 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3484
Location: Indianapolis
With some of these smaller games you certainly will want to fit more than one game per bank. The games true reset vector would be wherever it's convenient for the menu program (such as in a table that includes the NMI and RESET vectors of every game). In this case I normally set the ROM's NMI to point to $0170 or someplace odd that wouldn't be touched normally, the menu program can just put a JMP there. The "fake reset" triggered by the menu would be similar, but include a bankswitch write before the JMP.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2012 5:11 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
Memblers wrote:
With some of these smaller games you certainly will want to fit more than one game per bank. The games true reset vector would be wherever it's convenient for the menu program (such as in a table that includes the NMI and RESET vectors of every game). In this case I normally set the ROM's NMI to point to $0170 or someplace odd that wouldn't be touched normally, the menu program can just put a JMP there. The "fake reset" triggered by the menu would be similar, but include a bankswitch write before the JMP.

The reset vector doesn't even have to be the same in all banks, as long as you are willing to make the reset code larger than 8 bytes (so that it can bankswitch from RAM). This is a good idea if by any chance it's impossible to find a ROM location that's free in all games. Something like this should work if the menu is in bank 0 (finding 19 free bytes is harder than finding 8, but finding 8 free bytes in the same location in all games might be harder than finding 19 bytes anywhere):

Code:
Reset:
   ldx #$06
-   lda Bankswitch-1, x
   sta $ff, x
   dex
   bne -
   jmp $0000

Bankswitch:
   stx Bankswitch-1
   jmp InitializeMenu


In banks that only have one game, the NMI vectors don't have to be changed. Some games have very timing-sensitive NMI routines, so this is a good thing. Hopefully this will not be the case for the smaller games.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2012 6:00 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
Dwedit wrote:
Does BNROM guarantee that the first page will be swapped in at reset, or does every page need reset code?

Tokumaru guessed most of the design that I plan to use. NROM-128 automatically gets patched at $BFF0 if the reset vector is in $C000-$FFFF or at $FFF0 if the reset vector is in $8000-$BFFF. With NROM-256 or CNROM, the user must specify in a config file (the same one with the instruction blurbs) whether to patch 10 bytes at $FFF0 (more or less the Barbie stub) or 21 bytes anywhere (more or less the stub tokumaru listed). I also plan on storing the data that the patch replaces in the ROM's directory so that extraction of individual ROMs from the multicart is still lossless.

Memblers: Multiple titles can share a PRG ROM bank if the config file gives each game's entry point. These can even use CNROM if the game doesn't bankswitch after starting.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2012 8:46 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
How are you emulating CNROM with BNROM?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2012 9:18 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
tokumaru wrote:
How are you emulating CNROM with BNROM?

By loading the CHR bank assigned to the title before handing control over to the game. It's for things like Donkey Kong Classics, which combine two originally NROM-128 games into one CNROM. Games that switch banks after the game begins obviously wouldn't work. For example, the config records for four of the games might look like this:
Code:
# config file for action 53
title=LJ65
author=Damian Yerrick
year=2009
rom=LJ65_CRoom.nes
chrbank=0
reset=$C000
description:
Pack the blocks[etc]
.

title=Concentration Room
author=Damian Yerrick
year=2010
rom=LJ65_CRoom.nes
chrbank=1
reset=$8000
description:
Flip cards[etc]
.

title=Lawn Mower
author=Shiru
year=2011
rom=Mower_Thwaite.nes
chrbank=0
reset=$C000
description:
Cut grass[etc]

A: Go fast
.

title=Thwaite
author=Damian Yerrick
year=2011
rom=Mower_Thwaite.nes
chrbank=1
reset=$8000
description:
Shoot down ABMs[etc]

B: Fire from left silo
A: Fire from right silo
.

Each ROM would become two titles in the menu software:
("LJ65", PRG=4, reset=$C000, CHR=6)
("Concentration Room", PRG=4, reset=$8000, CHR=7)
("Lawn Mower", PRG=5, reset=$C000, CHR=8)
("Thwaite", PRG=4, reset=$8000, CHR=9)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 2 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