This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

NES program running without cartridge

NES program running without cartridge
by on (#199477)
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
by on (#199478)
Where would the CHR data come from? ie, no tiles.
Re: NES program running without cartridge
by on (#199479)
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
by on (#199483)
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
by on (#199489)
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
by on (#199490)
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
by on (#199492)
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
by on (#199494)
Could something be gained soldering jumpers between pins on the expansion port? Making this even worse...
Re: NES program running without cartridge
by on (#199495)
Look at some videos of TapeDump running without cartridge, that's what it would look like.
Re: NES program running without cartridge
by on (#199498)
Obviously, but COULD it maybe look any better?
Re: NES program running without cartridge
by on (#199500)
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
by on (#199596)
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
by on (#199600)
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
by on (#199620)
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:
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
by on (#199627)
Quote:
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: