jdrose, on Fri Dec 30, 2011 11:04 AM, said:
* Is there enough room to write useful rewriteable code?
There are some bankswitching schemes that add extra RAM, which is contained in the cartridge. If you're running your code in an emulator (Stella being the one that's most frequently updated), you can use pretty much any of these bankswitching schemes. At least one type of extra RAM-- Atari's Superchip (a.k.a. SARA chip)-- doesn't support self-modifying code, but others do. And if your game is published on a Harmony cartridge, self-modifying code will work even with the Superchip bankswitching schemes. So this lets you save the zero-page RIOT RAM for variables that need to be written and read more quickly with zero-page addressing, and use the extra RAM for self-modifying code or other things (playfield RAM, player/missile RAM, etc.). But you need to keep in mind that nearly all bankswitching schemes with extra RAM use one set of addresses for writing to the RAM, and another set of addresses for reading from the RAM, since the cartridge slot has no R/W pin-- hence one of the address pins must be used for this purpose. The only exception I know of is the 4A50 bankswitching scheme, which uses "magic writes" to write or read the extra RAM using just one set of addresses.
jdrose, on Fri Dec 30, 2011 11:04 AM, said:
* Is the reset button a hard or soft reset? Does the hardware do a hard reset right after power up?
Yes, the hardware (or the 6507 CPU) does a hard reset right after power up. But the reset button on the console doesn't actually do anything by itself-- it's just a button, and one of the bits in one of the RIOT (6532) chip's I/O registers will indicate whether or not the reset button is pressed. Your program can respond to the reset button in any way you wish-- reboot the program from the power-up vector, jump back to some routine that comes after the initial power-up routine, make the screen change color, play a sound, pause or unpause the game, etc. And if your program never checks the status of the reset button, pressing reset won't do anything at all. Of course, Atari's game design standards suggest that the reset button be programmed to reset the game, since that's what the button is called-- but you could program it to do something different if you want.
jdrose, on Fri Dec 30, 2011 11:04 AM, said:
* What are "mirrored" addresses in the 2600 memory map? How are they used?
As already explained, the lack of address pins for A13, A14, and A15 mean that those bits of a 16-bit address are ignored, since the 6507 can't detect them, so $1xxx will address the same memory as $3xxx, $5xxx, $7xxx, $9xxx, $Bxxx, $Dxxx, and $Fxxx. But it's even more complicated than that, because the TIA chip and RIOT (6532) chip have fewer than 13 address pins-- the TIA chip has only 6 address pins, and the RIOT chip has only 7 address pins. Both the TIA chip and RIOT chip have multiple chip select lines that are connected to specific address pins on the 6507, so they show up in separate areas of memory from each other. Furthermore, the number of address pins that are actually used by the TIA chip and RIOT chip varies depending on the function. TIA read operations use only 4 address pins, whereas TIA write operations use 6 address pins, so that means the TIA read addresses are mirrored within the TIA write addresses (e.g., $0000 and $0010 are different write addresses yet are the same read address). And it's even worse with the RIOT chip. Normally, to keep things as simple as possible, the lowest possible addresses are used-- i.e., where any "don't care" bits are set to 0. But it's fairly common to use $F000 through $FFFF to address the cartridge memory (as opposed to $1000 through $1FFF), since the 6502 (on which the 6507 is based) uses $FFFA through $FFFF for interrupt vectors and the power-up (reset) vector, hence it makes sense to use those same addresses with the 6507 as well. On the other hand, it's useful to use different addresses for different banks if you're using bankswitching, such as $1000 through $1FFF for one bank, $3000 through $3FFF for another bank, and so on, to help you more easily identify which bank a particular routine is in. Also, some programmers use $0040 through $004D for the TIA read addresses, so they'll be distinct from the TIA write addresses. And some bankswitching schemes use accesses to $0000 through $003F to trigger bank switching, which necessitates "relocating" the TIA read and write addresses to $0040 through $007F.
jdrose, on Fri Dec 30, 2011 11:04 AM, said:
* The VCS was introduced when all TVs were Cathode Ray Tube based. Any modification to code/timing needed to be made for
modern TVs with LCD, Plasma, LED, etc. displays?
No, but some hi-def TVs automatically interlace the screen display, even though the 2600 was constructed to draw a non-interlaced 262-line display. If you have a TV that does that, you can create a flickered display and it will automatically be displayed as a flicker-free interlaced picture-- although it will flicker on other TVs, so it isn't advisable to capitalize on that unless you're programming a game for your own use.