From: "Karri Kaksonen"; on Fri., May 13, 2011; at 02:10 AM -0400 > > On 13.05.2011 02:06, Greg King wrote: > > > > I have created a beta-test port of the 3D Maze game > > for Atari Lynx emulators (Handy, Mednafen). > > > > http://mysite.verizon.net/vze4nxfk/3dmaze.lnx > > > > The text at the beginning and the end is printed by CONIO'S > > cprintf(). Use the joypad to move through the maze. Button A > > leaves the maze. The "flip" option will invert the screen and > > joypad while you are in the maze. The "reset" option will make > > a new maze when you are at the end-screen. > > That is good news. :) The code works well on Mednafen. > > I am very curious about how to make the source portable enough to > support all targets. I didn't need to do much. The graphics already is portable. It is just a group of straight lines. And, the size of the walls is adjusted to the resolution of the TGI driver. The two main adjustments that I did are that I reformatted the text to fit the smallest screen (which is the Lynx's 20 columns by 12 rows). And, I put a new function in between cgetc() and the exploration function. GetMove() calls cgetc(). If something was typed, then it is returned. Otherwise, joy_read() is called. Joystick/joypad directions are translated into the equivalent keyboard characters, and returned. (And, of course, the Atmos and Lynx platforms install, instead of load, the two drivers.) > > Have you already checked in the conio cprintf() support for the Lynx? No. I need to submit some "foundation" files first. New LD65 configuration files and headers will export/import the location of the screen. It will allow us to move the screen, at link time, if we need to use high RAM for something else. By the way, I redesigned those configuration files, in order to make it easier to build cartridge directories. Each file that goes into a cartridge can create its own entry -- independently of all other entries! I wrote a macro file, "asminc/lynx-directory.inc", that defines the entry and exports a label to its location. Currently, it exports the actual cartridge address (because it's more efficient); but, there is (commentted out) code that could export an index number. Here is something to whet your appetite. This is how the Klondike game in your Solitare cart. could "publish" its location: ------------------------------------------------------------------ ; klondikedir.s ; ; Create a cart. directory entry for a file. ; ; 2009-12-09, Greg King .include "lynx-directory.inc" ; Directory entry -- for the file that we want to load. ; ProgEntry "KLONDIKE" ; The file that we want to load. ; .include "klondike.s" ------------------------------------------------------------------ The "KLONDIKE" above is the prefix of the game's segment-names in the cart.'s configuration file. And, "klondike.s" is the output from the compiler. ProgEntry exports the label "_KLONDIKE_FILE". The resident dispatcher can import it as either extern CartDirEntry_t KLONDIKE_FILE; #define KLONDIKE_FILE &KLONDIKE_FILE or extern CartDirEntry_t KLONDIKE_FILE[]; Then, that overlay can be loaded by CartLoadFile(KLONDIKE_FILE); My scheme isn't quite as automatic as you had hoped is possible; but, it comes close. We won't care about the actual values. We could re-arrange a cart. without needing to change the source code. ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Tue May 24 18:23:53 2011
This archive was generated by hypermail 2.1.8 : 2011-05-24 18:23:55 CEST