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 > Freezer test-programs?
2018-01-20 15:01
tlr

Registered: Sep 2003
Posts: 1701
Freezer test-programs?

Before starting to write some of these, I'd like to know which already exist. It's also interesting to know of programs that are notably hard to freeze.

I know of these: https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/C64..

thnx in advance
2018-01-20 19:29
chatGPZ

Registered: Dec 2001
Posts: 11088
anything that relies on cia timers being in sync with the raster. if i had to come up with something that breaks every freezer, i'd use the TOD for some long time measurements and then 2 or 3 timers that run at frequencies that are not even multiples of each other
2018-01-20 19:35
AlexC

Registered: Jan 2008
Posts: 293
May I add to the list:

- using 100% of stack (some old freezers had problem with it)
- using SID registers (some freezes have problem with it)
- using communication with drive while uploading into drive memory code that synchronizes with code in c64
2018-01-20 19:41
chatGPZ

Registered: Dec 2001
Posts: 11088
using drive is cheating :) (very easy to break freezer with that)

but SID is an interesting thing indeed
2018-01-20 19:43
tlr

Registered: Sep 2003
Posts: 1701
In reply to groepaz: Good suggestions! I'm trying to start off with more rudimentary coverage first. E.g 00/01 combinatons, stack corruption, etc... The aim is to be able to profile behaviour of freezers such that corner cases can be improved a bit. Quite a few cases will be hard to fix obviously.
2018-01-20 19:46
tlr

Registered: Sep 2003
Posts: 1701
SID is tricky indeed. You could rely on the waveform read from d41b for example. This is less of a problem for debugging as the registers can be kept then.
2018-01-21 09:52
ChristopherJam

Registered: Aug 2004
Posts: 1359
SID state looks nigh intractable to get 100% correct, unless you monitor all writes to it and run your own cycle exact emulation on the cart.

So do existing carts like AR VI etc just track the last values set for each register or what?
2018-01-21 11:57
tlr

Registered: Sep 2003
Posts: 1701
No, they more or less just check for activity in $d41b and set the volume register to $00 or $0f on unfreeze depending on that (they do set some static values for the voices as well).

Anyway, I'd really like pointers to preexisting programs (games perhaps?) to test out various freezing aspects.
2018-01-21 15:00
AlexC

Registered: Jan 2008
Posts: 293
Two from top of my head:
1. Happy Bug (demo) Happy Bug
2. Protium (uses disable NMI trick described in vice test docs)
2018-01-21 18:17
tlr

Registered: Sep 2003
Posts: 1701
I did some tests on stack corruption just to get an idea:
number of corrupted bytes on the stack (normally just below the current SP):

cart    freeze/restore    backup
-------------------------------------
FC3        $25 ($25)      $27 ($27)
ARVI       $18 ($18)      $18 ($18)
RR38P      $18 ($18)      $18 ($18)
SS522v1    $11* ($11*)    $19* ($19*)
KCSv2      $12 ($12)      $19 ($19)
FFmk4      n/a            $29 ($29)
FMv2       n/a            $24 ($24)
TFR08      $0B (n/a**)    n/a
SF05Y      $04 ($09)      n/a
SF05       $0B ($0B)      n/a
-------------------------------------
values within parenthesis are with $01=$34, otherwise $37
* 5 of the bytes look like corruption at $01dc-$01e1
** crashes
The three last ones do not include a backup option and lack some TOD functionality so stack usage is kept low. AR and RR seems to use the same restore code for both freeze/unfreeze and backup, hence the largish value.

SS5.22 seems surprisingly bad! Try this:
.C:c000  A2 E0       LDX #$E0
.C:c002  9A          TXS
.C:c003  EE 20 D0    INC $D020
.C:c006  4C 03 C0    JMP $C003
... then freeze/restore... BOOM!
2018-01-21 22:25
AlexC

Registered: Jan 2008
Posts: 293
Great work tlr! I guess all interested knew some of those values but I could never find one place that has all details. I'll take look into Expert and share my results.
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
psych
Vai/Slash Design
Malmix/Fatzone
deetsay
Nordischsound/Hokuto..
cba
Eryk/Chrome
Twoflower/ΤRIΛD
BlackJack/Civitas
New Design/Excess
rexbeng
Guests online: 310
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (10)
2 Facet  (9.7)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

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