On Fri, 27 Mar 1998, Ethan Dicks wrote: > I'm using Matt Dillon's DASM V2.12 (as enhanced by Olaf Siebert) under Solaris > to do my cross assembly for programs running under VICE, and I'm having > problems getting conditional assembly to work. Can someone e-mail me a > short example? Get the prlink source code from http://sunsite.unc.edu/pub/micro/commodore/crossplatform/transfer/CBM-to-PC/ (in the North American mirror of FUNET's /pub/cbm archive). There is only one source code for all platforms, cable types and memory expansions, and one huge MakeAll.sh script generates all the binaries. > What I'm trying to do is to write one .src file that will compile for > VIC, PET and C-64, depending on the switches to DASM, or, barring that, > by depending on a unique header for each architecture that defines the > appropriate symbol. I think the switches are -D and -M. -M (or whichever it was) lets you to define expressions that will be evaluated later, e.g. -Mvideo=ntsc would let you to define the numerical value of the constant ntsc in your source code. The switch could be called something else, so RTFM if it doesn't work. Also, disassembling the produced file may sometimes be useful. My recursive disassembler d65 does the job fairly well, although I never got around to finish it. > When I get a compilable example, I'll be posting a library I wrote for > the PET to emulate the most important VIC/C-64 kernal calls (SETLFS, > OPEN, etc.) It took me weeks to root around in the PET ROMs to match up > functionality with its younger brothers. The prlink source code has something similar (a header file with addresses of some file routines in some PET ROM versions). > So far, the acid test has been porting Zork I to the PET. It mostly > works, but I think part of the print routine in the ROMs is stepping on > some zero page variable used by the Z-machine. Try running it on VICE, and patch the emulator so that the data-fetch macro or function prints out a message each time the address range is referenced whenever the program counter is in the ROM's range. I was able to detect and remove some very nasty copy protections from some VIC-20 games by modifying the emulator. Marko
Archive generated by hypermail 2.1.1.