From: karri (karri_at_twins.dna.fi)
Date: 2003-04-28 18:16:39
On Mon, 28 Apr 2003, Ullrich von Bassewitz wrote: > > On Mon, Apr 28, 2003 at 02:02:51PM +0200, Groepaz wrote: > > > It can. Just change _curunit before opening a file. > > > > uhmz well... not very portable :=P (i'm not only looking at cc65 targets) i > > wont call this more than "workaround" until we have something better. > > I thought about using "drive:filename", but this syntax is already used by the > CBM dual drives. So I came up with the current solution. I think it will be > difficult to find a syntax that works and feels "natural" on every platform. > > > > Hmmm. How about implementing a RAM disk via a driver, and add another > > > (platform dependent) module that links the first one into the CBM kernal > > > calls? > > > > ? explain :=) > > First, write a loadable module that uses an extended memory driver to > implement something filesystem like, but with different names than the > existing ones (maybe ramdisk_write(), or rd_write() or similar). Then add > another loadable module that hooks into the kernal jump vector somehow and > redirects OPEN/BSOUT/CLOSE calls for a drive with a spcific number. The Atari Lynx has a slightly different problem. It uses a ROM instead of a disk-drive. That means that a ramdisk does not make sense. The only writable element is a 1024 bit EEPROM that is used for high-scores in some games. I tried to browse through the current documents and found something called dio_read that makes a raw disk read. The Lynx has hard-coded sectors that can be 512, 1024 or 2048 bytes. The way you read the data is to give the sector number and then you read X bytes out of a fixed memory address. It will then increment the ROM pointer with one during every read. What would be the natural function to implement this in a cc65 environment? If you read more than 512 bytes from a cart that has 512 byte sectors then it wraps around and you get the same bytes twice. -- Regards, Karri ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-04-28 18:18:37 CEST