Page 1 of 1

NES program running without cartridge

Posted: Sun Jul 02, 2017 9:39 am
by za909
I've had this crazy idea of "could an NES game cartridge be removable without the game crashing?". I realize the space issue would be huge, since there would only be a bit above 1.5k of code that could be housed by the RAM, while still leaving some zero page and stack space for variables. But the biggest issue is what to do with the display? With no CIRAM wiring connected and no tiles, the only thing I could imagine that would work would be to "go Atari 2600" and draw "pixels" after having gone through all the trouble of syncing up the CPU and the PPU. Now drawing using palette changes would not work because after every write, the PPU address is auto-incremented to point to the next palette entry, which would produce unwanted "pixels". On top of that, the time it takes to write the next color to the PPU would be too much to have acceptable pixel resolution this way (the PPU having produced too many pixels by the time a new color is written). But maybe it could be simplified by using grayscale mode and the color emphasis bits for a basic 3-bit RGB palette (whose brightness could be slightly changed by the underlying palette entry, $x0).
Would it be possible to have something as simple as Pong working this way?

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 9:59 am
by dougeff
Where would the CHR data come from? ie, no tiles.

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 10:11 am
by lidnariq
For the most part, an operating PPU without a cartridge will see the open bus pattern, so you can't really use the tilemap.

Sound, OAMDMA, PPU palette work as normal.

IRQ; NMI; CIC; PPU name, attribute, and character tables, don't; you have to poll for NMI/IRQ instead.

I did a ridiculous thing in the past.

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 10:37 am
by tokumaru
The good side of not being able to use VRAM for graphics is that you get an extra 2K for the game state and data, leaving most of the CPU RAM free for actual code.

That being said, I don't think you can pull off any kind of usable graphics when rendering is off. Manipulating the PPU address is way too slow, and even if you used 3 settings of emphasis bits (one in each of A, X and Y), the 4 cycles needed for a PPU write correspond to 12 pixels, so the horizontal resolution would be limited to 21 or so pixels. And each line would take 63 bytes of precious RAM.

Yeah, I really can't think of a way to do graphics for games other than Simon or others that can be similarly blocky.

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 12:24 pm
by FrankenGraphics
Huh... Doesn't the nametable remain in memory when you eject the cartridge (which you used to inject the program with anyway)? There's easily recognizable shapes when you remove it, iirc*

*on a nes with pin four on the lockout chip disconnected/tied to gnd.

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 12:32 pm
by Bregalad
tokumaru wrote:The good side of not being able to use VRAM for graphics is that you get an extra 2K for the game state and data, leaving most of the CPU RAM free for actual code.
Unfortunately, both the enable pin and an adress pin of that RAM chips comes from the cartridge, so without it... the whole 2k VRAM is completely unusable.

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 12:44 pm
by tokumaru
Bregalad wrote:Unfortunately, both the enable pin and an adress pin of that RAM chips comes from the cartridge, so without it... the whole 2k VRAM is completely unusable.
Oh crap, I didn't think of that!

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 12:54 pm
by FrankenGraphics
Could something be gained soldering jumpers between pins on the expansion port? Making this even worse...

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 1:06 pm
by Dwedit
Look at some videos of TapeDump running without cartridge, that's what it would look like.

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 1:10 pm
by tokumaru
Obviously, but COULD it maybe look any better?

Re: NES program running without cartridge

Posted: Sun Jul 02, 2017 1:22 pm
by lidnariq
You certainly could add a pair of resistors to give you m218-style PPU ability, but then you've modified the console.

To me, it seems a little off track to allow any modification to the console, other than maybe disabling/removing the CIC so that all console variants start off equally capable.

Re: NES program running without cartridge

Posted: Wed Jul 05, 2017 5:17 am
by slobu
Sounds like graphics are out of the question without a cart on base hardware?

Would the Aladdin Deck Enhancer alleviate that restriction?
https://en.wikipedia.org/wiki/Aladdin_Deck_Enhancer

Re: NES program running without cartridge

Posted: Wed Jul 05, 2017 5:54 am
by Dwedit
Once you have an Aladdin cart in there (or a Contra cart for that matter), you no longer have no cartridge.

Re: NES program running without cartridge

Posted: Wed Jul 05, 2017 11:10 am
by lidnariq
It's also not no graphics. You can still do blocky sprites. You can still do raster effects. (Which raster effects you can can fit in will be limited due to paucity of RAM).

In practice, I've noticed that floating pins on the NES cart connector (meaning specifically NTRAM/CE and NTRAMA10) very loosely capacitively couple with whatever's around, which in practice means "coupling with mains frequency". So a small portion of the screen will actually get valid data from RAM... See ccovell's Theremin.


(The blocky sprite tiles that you do get, when NTRAM/CE is floating high, will look like:

Code: Select all

wxyz2ttt
wxyz2tt3
wxyz2t3t
wxyz2t33
wxyz23tt
wxyz23t3
wxyz233t
wxyz2333
where "t"=transparent, "2" and "3"=palette entries 2 and 3, and "wxyz" = the lower 4 bits of the sprite #, in binary, where set bits are color 3 and clear bits are transparent.

Re: NES program running without cartridge

Posted: Wed Jul 05, 2017 1:36 pm
by FrankenGraphics
other than maybe disabling/removing the CIC so that all console variants start off equally capable.
This, and that the modification is so popular that i estimate that a fair percentage (at least in EU) have been modified. Second hand vendors seem to sell them modified oftener than not. I've modified my two PAL units and have done the modification to two other units for other people. I should probably get an unmodified unit before they run out so i don't forget what blinking gray looks like. :lol: