Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2 > #26603
| Newsgroups | comp.sys.apple2 |
|---|---|
| Date | 2016-01-07 07:31 -0800 |
| References | (23 earlier) <be7dee6b-7607-496c-b845-6efb1cbadc2a@googlegroups.com> <0153eb30-30b4-4f27-a2d0-db08db27072a@googlegroups.com> <3a57bd5a-e4a7-4c95-94fa-bc2a3f15f073@googlegroups.com> <ef9ebd15-09b9-42a4-b2d5-b0dfa2820822@googlegroups.com> <83e33ff2-9a8a-4422-805c-b3851d03f587@googlegroups.com> |
| Message-ID | <497f48e6-9c23-4cbe-a67e-c48ec5e2b805@googlegroups.com> (permalink) |
| Subject | Re: new ProDOS ports |
| From | BLuRry <brendan.robert@gmail.com> |
On Thursday, January 7, 2016 at 12:54:32 AM UTC-6, mdj wrote: > On Wednesday, 6 January 2016 16:58:17 UTC+10, qkumba wrote: > > > The point is that the target isn't a Disk ][ system, but a hard disk, by producing a version contained entirely within individual files, not a disk image. Given that, you'd need quite a lot of ProDOS to be resident in order to be able to write to the file system, in order to save the highscore (hence my reference to the 16kb which admittedly would be a complete ProDOS image, but even a trimmed version will be larger than what seems possible). The game is a single-loader when read, but the ability to save can be required multiple times in a single session (because the game can be restarted without rebooting, and a subsequent game might beat an existing high score). > > How big is the file containing the highscore/save data ? If the file is a fixed size, then writing its contents without ProDOS resident is actually pretty straightforward, assuming you have a loader program that has access to ProDOS beforehand, and you store save data in its own file. > > Assuming that, this is how I'd do it: > > 1. Get the current prefix with a GET_PREFIX call > 2. Open the directory file and locate the file entry for the save file. > 3. grab the key block pointer from the file entry > 4. Use a SmartPort/Block device call to load the key block into memory > > The key block contains a sequential list of all the blocks used to store the files data. This assumes of course, that the file is > 512 bytes and < 128k. If it is < 512 bytes, you're in luck, the key block *is* the files data. I seriously doubt any file you'd need to worry about is > 128k. If it was, it's definitely too hard to do without ProDOS. > > I expect most game titles don't have much of an operating system at all, and just save their data by dumping a bit of memory to disk sectors/blocks/tracks. Once you have your save files block list, reading/writing the data using SmartPort calls is pretty easy, and you can throw ProDOS away. Your resident read/write routines + the key block should be well under a kilobyte - within spitting distance of the size of RWTS :-) > > Obviously it's a few hours work to throw together a loader that can do all this stuff, but it seems to me the technique could throw the door open to just about any single-load title, and with some obvious extensions, a few multi-load ones as well. > > Matt Also, Martin Haye has figured out how to relocate prodos out of main memory for anyone who needs to do that sort of thing. :) -B
Back to comp.sys.apple2 | Previous | Next — Previous in thread | Next in thread | Find similar
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2015-11-02 13:12 -0800
Re: new ProDOS ports sicklittlemonkey <nick.westgate@gmail.com> - 2015-11-02 17:17 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2015-11-18 10:10 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2015-11-18 21:04 +0100
Re: new ProDOS ports Delfs <eeastman@gmail.com> - 2015-11-19 03:18 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2015-11-19 09:45 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2015-12-13 07:57 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-01 08:48 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2016-01-01 19:47 +0100
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-01 15:07 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-03 20:29 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2016-01-04 09:13 +0100
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-04 06:59 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-04 08:00 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-04 09:21 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-04 20:12 -0800
Re: new ProDOS ports D Finnigan <dog_cow@macgui.com> - 2016-01-05 21:12 +0000
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-05 20:37 -0800
Re: new ProDOS ports mdj <mdj.mdj@gmail.com> - 2016-01-05 21:00 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-05 22:58 -0800
Re: new ProDOS ports mdj <mdj.mdj@gmail.com> - 2016-01-06 22:54 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-07 07:31 -0800
Re: new ProDOS ports "Michael 'AppleWin Debugger Dev'" <michael.pohoreski@gmail.com> - 2016-01-07 15:45 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-07 18:29 -0800
Re: new ProDOS ports mdj <mdj.mdj@gmail.com> - 2016-01-07 20:19 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-08 07:57 -0800
Re: new ProDOS ports gids.rs@sasktel.net - 2016-01-07 20:22 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2016-01-08 12:54 +0100
Re: new ProDOS ports "Michael 'AppleWin Debugger Dev'" <michael.pohoreski@gmail.com> - 2016-01-08 23:30 -0800
Re: new ProDOS ports David Schmenk <dschmenk@gmail.com> - 2016-01-09 10:37 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-14 11:21 -0800
Re: new ProDOS ports Jerome Vernet <jeromevernet@hotmail.com> - 2016-01-14 22:30 +0100
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-15 19:52 -0800
Re: new ProDOS ports qkumba <peter.ferrie@gmail.com> - 2016-01-07 08:14 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2016-01-06 06:09 +0100
Re: new ProDOS ports gids.rs@sasktel.net - 2016-01-07 16:10 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2016-01-08 02:43 +0100
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-05 23:05 -0800
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-06 13:07 -0800
Re: new ProDOS ports Steve Nickolas <usotsuki@buric.co> - 2016-01-06 22:29 +0100
Re: new ProDOS ports BLuRry <brendan.robert@gmail.com> - 2016-01-06 14:06 -0800
csiph-web