aboutsummaryrefslogtreecommitdiff
path: root/cart.txt
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-02-10 21:40:44 -0500
committerB. Watson <yalhcru@gmail.com>2016-02-10 21:40:44 -0500
commita3b6b98841b832a8cc11ab6a760a4eda2a91839f (patch)
tree7cc20c6a48d5de7516a2d46832ee1807bb5d6817 /cart.txt
parent5ea5690f453b2b84f021c539d16b149e33795357 (diff)
downloadtaipan-a3b6b98841b832a8cc11ab6a760a4eda2a91839f.tar.gz
add check for at least 32K to cart, various tinkering
Diffstat (limited to 'cart.txt')
-rw-r--r--cart.txt104
1 files changed, 54 insertions, 50 deletions
diff --git a/cart.txt b/cart.txt
index a7783da..f897de9 100644
--- a/cart.txt
+++ b/cart.txt
@@ -23,10 +23,16 @@ joey_z is willing to manufacture carts like this:
"For bank-switched cartridges banks are numbered in the order they appear
in the image file, starting with 0."
+So far, he's built a prototype (old EPROM, dead-bug mounted logic ICs,
+hand-wired) and is working on a cleaner version, using a 99 cent flash
+chip, for production. The only cart shells we've been able to find are
+actually for the C=64, and will supposedly work on any Atari 8-bit except
+the 1200XL.
+
...so:
-Bank 7 will have the startup code, uncompressed title screen, title
-code, and code to copy from the other banks to RAM.
+Bank 7 has the startup code, uncompressed title screen, title code,
+and code to copy from the other banks to RAM.
That gives me banks 0-6 to store code in. The code is 27174 bytes, so I
have plenty of space: it'll occupy 4 banks, leaving 2 empty ones. The
@@ -37,43 +43,40 @@ Code in bank 7 will copy all the chunks to correct place in RAM... and
I don't need to leave room for DOS or anything else, so the code can be
ORGed at $0400 (romable_taimain.raw target in the Makefile does this).
-$0400 + 27174 means the code ends at $6e26, and the BSS is less than a
-page. The OS will place the GR.0 display list at $7c20, and the stack
-will grow down from there to $7a40 (except it never grows that much).
-
-Copying the code to RAM will take some time, but not too much. Should be
-around 1/4 second, don't need a progress bar or anything. Not sure when to do
-the copying:
-
-1. At boot, before displaying title screen?
-2. After the title screen is displayed, before the menu is active?
-3. After the player presses space/enter to start the game?
+$0400 + 27174 means the code ends at $6e26. The BSS is right after that,
+and is less than a page. The OS will place the GR.0 display list at $7c20,
+and the stack will grow down from there to $7a20 (except it never grows
+that much).
-Options 1 and 3 will allow turning off ANTIC DMA during the copy, making
-it a bit faster. Option 2 gives the player something to look at while
-the copy is happening, but I think it'll be so quick as to not matter.
+Copying the game code to RAM causes a short delay at boot (0.43 seconds).
+It's barely noticeable, and lots of cartridge games have similar delays.
+The copying code could maybe be optimized to speed it up a little,
+but it's probably not even worth the effort.
Amusingly, the Taipan cart will work on a 32K 800. Not a 16K Atari though.
bank 7: fixed bank
-$a000-$b9xx - title screen data, dl, menu code
-$ba00-$bff9 - memory checker plus code to copy romable_taimain to RAM
+$a000-$bxxx - title screen data, dl, menu code,
+ memory size checker, code to
+ copy romable_taimain to RAM
$bffa-$bfff - cart trailer
banks 0, 1, 2: full banks of romable_taimain code
-$8000-$9dff - 30 pages (7680 bytes) of code
+$8000-$9dff - 31 pages (7936 bytes, 7.75K) of code
$9f00-$9fff - unused
-bank 3: last (partial) bank of romable_taimain, plus the font
+bank 3: last (partial) bank of romable_taimain, plus the font.
+This bank stays enabled after copying is done.
$8000-$9bff - up to 7K of code (28 pages)
$9c00-$9fff - font (1K)
-Unused areas are filled with $ff. For the banks that map at $8000, this
-includes the cart trailer area. A non-zero byte (our $ff) at $9ffc tells
-the OS that a cart isn't inserted in the right slot, so it won't try to
-initialize/run our cart as a right cart. Only bank 7 (that maps as a
-left cart) needs a valid cart trailer... according to cart.txt, every
-once in a while, bank 7 might come up selected at power on. This shouldn't
+Unused areas are filled with $ff (this is the default state for both
+flash and EPROM). For the banks that map at $8000, this includes the
+cart trailer area. A non-zero byte (our $ff) at $9ffc tells the OS that a
+cart isn't inserted in the right slot, so it won't try to initialize/run
+our cart as a right cart. Only bank 7 (that maps as a left cart) has a
+valid cart trailer... according to cart.txt, every once in a while, bank
+7 might come up selected in the $8000 bank at power on. This shouldn't
matter: it'll be in both bank areas, and if the OS tries to init it as
a right cart, the init/run addresses will point to the left cart area.
@@ -82,25 +85,33 @@ if I write one.
--
-Changes the game will need for a cart version: Not many.
+Changes the game needed for a cart version: Not many.
+
+.org $400 for taimain.xex. It could be a little higher, but making it
+as low as possible allows room for bugfixes or new features (if I ever
+add any).
+
+checkmem.s isn't needed any longer... though there is a new memory checker
+(in bank 7) that says "32K required" if someone tries it on a 16K machine.
-checkmem.s won't be needed any longer... though there will need to be
-a new memory checker (in bank 7) that says "32K required" if someone
-tries it on a 16K machine.
+Exiting the game (N at "Play again?" prompt) returns to the title screen,
+since there's no DOS to exit to. This might be slightly useful: you
+might decide to change the colors or disable sound for your next game.
-"Play again?" should probably be "Press any key to play again" since
-there's no place to exit() to. Unless I do a manual! Then it'll exit
-to the title screen, from whence the user can choose the manual or else
-start the game again.
+Pressing the Reset key does a coldstart (reboot) in the cart version.
+You end up at the title screen again.
-The title decompression will be gone: it'll just display the title screen
-DL and data straight from ROM. The menu help text might be in RAM though,
-as at least 2 bytes need to be modified (sound on/off).
+The title decompression is gone: it just displays the title screen DL
+and data straight from ROM. The menu help text and the tail end of the
+display list are in RAM though, so the menu can change them. Moving the
+end of the DL to RAM means one extra black (border-colored) scanline
+appears due to the DL jump instruction. I may make the border the same
+color as the text bg, to make this less noticeable.
-The font will be located in ROM, on a 1K boundary, so CHBAS can point
-to it (no need to copy to RAM).
+The font is located in ROM, on a 1K boundary, so CHBAS can point
+to it, rather that $2000 like the xex version.
-num_buf and firm will be located in the BSS rather than page 6 as they
+num_buf and firm are located in the BSS rather than page 6 as they
are in the .xex version.
Since I have 3 empty banks... Why not include a manual on the cart,
@@ -108,15 +119,6 @@ with pseudo-hypertext UI?
--
-Cart header (trailer, actually). Can I get away with using the same one
-for all banks? IIRC, the low one ("right cartridge") gets looked at first,
-does that mean the high bank doesn't even need a header?
-
-atari800 can load a .xex that's built with --start-addr 0x400. This will
-make testing the cart stuff slightly easier.
-
---
-
What would be *really* slick: figure out a way to split the code up
across banks and include bankswitching in the logic, so it runs from
the cart and switches banks as needed. This would allow Taipan to run
@@ -127,7 +129,9 @@ in asm? Probably. Do I want to? Not really.
--
-The cartridge label should look like a classic brown 1st-gen 400/800 cart.
+The cartridge label should look like a classic brown 1st-gen 400/800 cart,
+even if the cart shell itself doesn't.
+
Yellow text:
TAIPAN!