It is currently Thu Aug 16, 2018 9:28 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jan 05, 2018 7:48 am 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 616
I would like to investigate the behavior of a few custom mapper chips, and also measure the relative expansion sound volume of various Namcot 163 carts, with a self-written test program using simple means. My plan was to write and use the Everdrive N8 to run a mapper 0 program that copies itself into RAM ($000-$7FF), disables interrupts and NMI and waits for controller input. While it does that, I remove the Everdrive N8 and insert the cartridge whose properties I want to test, press a controller button, so that my program in RAM will do its test and report its results acoustically or via attribute byte changes.

Can this work, and if not, can it damage any component? I plan to use a Twin Famicom for this, so there should be no unexpected reset during the hot-plugging sequence.


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 9:08 am 
Offline

Joined: Tue Nov 23, 2004 9:35 pm
Posts: 677
I tried Chris Covell's TapeDump program once on my AV Famicom to dump my 72-pin Super Mario Bros. cartridge. I am pretty sure I used my EverDrive to load the dumping ROM, then swapped it out with SMB (with an attached pin converter) and successfully completed the dump. My EverDrive is still going strong, as is my AV Famicom. I believe what you want to do is pretty similar in concept and execution.

viewtopic.php?f=2&t=7978

Anecdotal evidence I know, but I hope it helps.

_________________
Nerdly Pleasures - My Vintage Video Game & Computing Blog


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 9:42 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6588
Location: Canada
I've done this probably hundreds of times with my PowerPak / Famicom. I'm sure the Everdrive could do it as well.

There's probably a 50% chance the NES will crash when you pull the cart out, but its easy to just try again.


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 9:46 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20405
Location: NE Indiana, USA (NTSC)
I've been told that doing OAM DMA in a fairly tight loop reduces the chance of crashing, though it appears not to work for everyone. (See previous posts: blargg mentions OAM DMA; VRC6 Test Rom and hot swapping carts)

Code:
loop:
  lda #$02
  ldy #$22
  sty $4011  ; buzz the speaker to indicate not crashing
  sta $4014  ; initate DMA
  sta $4011  ; more buzz
  sta $4014  ; another DMA

  ; OMITTED: do whatever check for whether done
  beq loop


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 10:13 am 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 355
Location: Poland
I have AX5202P MMC3-clone based cartridge which ocassionaly gets really hot when hot plugged (into kazzo). I would not recommend hot-swapping anything that was not designed.

Some chips require proper supply voltage timings. If the cartridge edge connetor makes contact on address/data lines before the power line contact, the cartridge's chips will be powered through those lines which might damage it.


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 10:19 am 
Offline

Joined: Tue Feb 14, 2017 9:50 am
Posts: 84
krzysiobal wrote:
I have AX5202P MMC3-clone based cartridge which ocassionaly gets really hot when hot plugged (into kazzo). I would not recommend hot-swapping anything that was not designed


This is indeed not completly on subject but it's a good chance to ask; I've noticed that with my Kazzo as well, I have a bunch of cartridges where a PAL or a MMC chip get very hot in minutes when plugged in the Kazzo. Like Contra Fighter (on that one it was very bad) and KS-7030. I'm guessing the chips are trying something that continuously fail and draws a lot of current?


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 11:05 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 273
Location: Rio de Janeiro - Brazil
I have a question not entirely on topic: has anyone ever made a game that transfers itself to nes ram on startup and then runs entirely there and the cartridge can be removed? I had no idea the cartridge could be removed like that.

_________________
http://nesrocks.com/blog/superpitfall30th/


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 11:09 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6588
Location: Canada
nesrocks wrote:
I have a question not entirely on topic: has anyone ever made a game that transfers itself to nes ram on startup and then runs entirely there and the cartridge can be removed? I had no idea the cartridge could be removed like that.

If you remove the cartridge, CHR isn''t connected to anything so you can't really have any graphics except attributes or raster lines? (Actually, not sure about attributes... addressing the nametables might not be possible without a cartridge?)

ccovell wrote a theremin program (audio only) that runs like this though. It also used some analog electrical effects present without a cartridge in to respond to your hands nearby.
viewtopic.php?f=2&t=8988&p=95339&hilit=theremin#p95339


Last edited by rainwarrior on Fri Jan 05, 2018 11:50 am, edited 3 times in total.

Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 11:11 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20405
Location: NE Indiana, USA (NTSC)
Furthermore, timing sources aren't reliable. The vblank bit in $2002 has that race condition between reading and acknowledgment, and there are no IRQ or NMI vectors when no cartridge is inserted. What timing source is reliable and not subject to a race condition?


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 11:14 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6588
Location: Canada
$2002 is reliable "enough" for a lot of purposes though. Not for raster timings, but certainly for a coarse "frame" timing. I've used it for that on many hotswap tests.

How often you get the race condition is dependent on how often you are polling it. It's kind of a heisenberg uncertainty thing where you can make it more reliable but less precise, or vice versa. (You could also use a tight loop to hit it precisely once to get things started, and then just go cycle-timed from there on?)

Actually maybe you could use sprite overflow for raster timings?


It occurs to me that many Atari 2600 games were as small as 2k and it was also a 6502. This is almost an Atari 2600 sized problem. ;)


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 12:10 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7388
Location: Seattle
nesrocks wrote:
I have a question not entirely on topic: has anyone ever made a game that transfers itself to nes ram on startup and then runs entirely there and the cartridge can be removed? I had no idea the cartridge could be removed like that.
I've also written something.

Quote:
If you remove the cartridge, CHR isn''t connected to anything so you can't really have any graphics except attributes or raster lines? (Actually, not sure about attributes... addressing the nametables might not be possible without a cartridge?)
No meaningful background at all. NTRAM's enable is floating, but seems to tend to float high towards "disabled". So for the most part, everything's just the PPU open bus pattern:
Attachment:
openbus.png
openbus.png [ 1.58 KiB | Viewed 1160 times ]


Sprites can be positioned and colored arbitrarily, but again, their contents are the open bus pattern:
Code:
WXYZ▒  ▄
WXYZ▒ █▄
WXYZ▒█ ▄
WXYZ▒██▄
(where WXYZ are color 3 if the 8s, 4s, 2s, and 1s bits of the tile number is set, backdrop/transparent otherwise) , █ is color 3, ▒ is color 2, ' ' is transparent.


Top
 Profile  
 
PostPosted: Fri Jan 05, 2018 8:57 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10708
Location: Rio de Janeiro - Brazil
The sprite overflow does sound like a reliable way to keep track of time. I believe you can even place them on scanline 240 (Y coordinate 239 in their respective OAM entries) so they're evaluated during the last visible scanline, but never displayed, so you don't have to worry about their palettes or their graphics.


Top
 Profile  
 
PostPosted: Sat Jan 06, 2018 5:34 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 273
Location: Rio de Janeiro - Brazil
lidnariq wrote:
I've also written something

That sounds great. These things would go viral with a properly editted video to show it off.

lidnariq wrote:
No meaningful background at all. NTRAM's enable is floating, but seems to tend to float high towards "disabled". So for the most part, everything's just the PPU open bus pattern

Looks like you can almost reliably have the attribute table being used as huge 16x16 "pixels" and have a crude game going on (snake perhaps).

_________________
http://nesrocks.com/blog/superpitfall30th/


Top
 Profile  
 
PostPosted: Sat Jan 06, 2018 6:45 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3541
Location: Indianapolis
If it's a cart you can afford to replace, hot-swapping should be fine. Probably best not to take any chances if it's something rare.

I use a Game Genie to mess with carts. Some of them have epoxy blobs, but the other ones have a normal 27C32 EPROM that can be replaced. After setting the Game Genie control registers, you have access to the cart, but can no longer access the GG ROM or registers. I use a bootloader ROM that will send/receive data over the 2nd controller port with a USB-to-TTL adapter, it can load a program into NES RAM $200-$7FF or write an .NES file to a GTROM cart. Maybe I should share the EPROM code if anybody wants build one, otherwise all this comes with the Cheapocabra devkit which normally goes for $35+shipping.

I haven't tried plugging an FC cart adapter into the Game Genie before, but I imagine it should work fine.


Top
 Profile  
 
PostPosted: Sat Jan 06, 2018 2:56 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7388
Location: Seattle
nesrocks wrote:
Looks like you can almost reliably have the attribute table being used as huge 16x16 "pixels" and have a crude game going on (snake perhaps).
No... there's no ability to change which attributes are used where. It's always going to be the four palettes in that pattern.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 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