Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Best loader for games
2020-01-29 10:44
Golara
Account closed

Registered: Jan 2018
Posts: 212
Best loader for games

What is the best loader for games ? Here's a list of features I'd like and please tell me if there's a loader that supports these.

Fast loading (duh)
Loading by track/sector/file
Saving without reinstalling the loader. Also by track/sector/file
2x 1541 working at the same time (1 game disk, 1 empty disk for "swap")

thanks
 
... 21 posts hidden. Click here to view all posts....
 
2020-01-29 19:02
Golara
Account closed

Registered: Jan 2018
Posts: 212
Quote: For Eye of the Beholder I did disk I/O after about 1 year of coding. :)

Yeah, but I want to make a real-time action rpg like legend of zelda.
2020-01-29 19:32
Carrion

Registered: Feb 2009
Posts: 317
Quote: Yeah, but I want to make a real-time action rpg like legend of zelda.

#metoo
2020-01-29 19:45
cadaver

Registered: Feb 2002
Posts: 1160
IMHO, then you have to think like making an action game, and keep disk I/O minimal, often only during area transitions, or when loading dialogues and such. By encoding story events or monster alive/dead status into bits you can keep the savestate small. I'm not sure keeping an exact state of the whole world (like X/Y positions of every NPC and monster) actually matters much to the player. Though being able to stash items into the world and having them persist might be good.
2020-01-31 09:09
cadaver

Registered: Feb 2002
Posts: 1160
Now that I got thinking how to possibly improve my loader .. are there examples of loaders that do both a custom sector decode, and some degree of drive-side directory caching? Since an optimized decode already uses 2 buffers, there's not a lot of space to work with.

EDIT: Of course Krill's loader does. :) Taking over the diskdrive rather completely instead of relying on ROM routines, it can use more memory.

Others?
2020-01-31 11:04
Krill

Registered: Apr 2002
Posts: 2980
Quoting cadaver
Since an optimized decode already uses 2 buffers, there's not a lot of space to work with.
A fully-optimised decode routine uses just one buffer ($0100 bytes), holding a decoded and checksummed block only a few cycles after the last relevant GCR-encoded byte has rolled in from the spinning disk. =)

Since the directory-handling code takes up quite some space in the 2 KB of RAM, i only have 9 directory entries in the cache (filenames are stored as 2-byte hashes). This isn't much of a problem for demos, which usually load files in sequential order, such that the next directory chunk only needs to be fetched once for a run of 9 files, when the loader is idle after the 9th file has loaded.
Games tend to load files in random order, so having to go to the directory track is much more likely.
2020-01-31 11:49
MagerValp

Registered: Dec 2001
Posts: 1078
And in my loader I put the directory handling in C64 ram instead, and the drive code just deals with T/S. Round trip to track 18 costs too much time for games that constantly load lots of small files.
2020-01-31 12:47
cadaver

Registered: Feb 2002
Posts: 1160
Thanks for the insight. I waste an obscene half KB for a full drive-side cache, but it serves well in my scenario. It's just tempting to see how a 1571 in 2MHz mode can handle tighter interleaves even with the stock ROM decode, and dream of how 1541 might be possible to force into doing the same :)
2020-01-31 13:50
Krill

Registered: Apr 2002
Posts: 2980
Quoting cadaver
Thanks for the insight. I waste an obscene half KB for a full drive-side cache, but it serves well in my scenario. It's just tempting to see how a 1571 in 2MHz mode can handle tighter interleaves even with the stock ROM decode, and dream of how 1541 might be possible to force into doing the same :)
While 1571 fully decodes and checksums blocks on the fly already with the ROM routines, the same has been achieved with custom software on a stock 1541.

On a C-64, both 1541 and 1571 (with a single-sided disk) deliver the same speed with my loader, interleave 3 on tracks 18+ and interleave 4 on the dense 21-blocks tracks 1-17 (where interleave 3 is missed by just a few cycles and almost the entire 4th block rolls by uselessly).
However, on a C-128 (running in native mode), 1571 manages interleave 3 across the entire disk thanks to hardware-clocked ("burst") transfer.
Apparently, that's ever so slightly faster than the 72 cycles per byte ATN-clocked bit-pair transfer. =)
2020-02-01 11:57
Copyfault

Registered: Dec 2001
Posts: 478
Quoting Golara
Well, I want to write more than just a small file with a high score. I wanted to make a game using 1541 like hard disk, with a lot of swapping. [...]
This sounds very interesting.

+1 for going into this direction. Maybe this approach evolves so one day we come to see version/cracks of games that no vanilla c64 version exists as of yet (all those nasty CRT/REU/EasyFlash-only-releases f.e.;)).
2020-02-01 14:32
MagerValp

Registered: Dec 2001
Posts: 1078
Actually, for a game like that in 2020 I'd just go with a cartridge release. Makes development easier, the player experience better, and the physical release cooler. Enough people have EasyFlash or Ultimate carts for the digital release. Plus it messes with the crackers :D
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Holy Moses/Role
Chesser/Blazon
Grue/Extend
EALL/HT
Beast/Crescent
DnP
Guests online: 93
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.046 sec.