Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user TheTom ! (Registered 2018-07-22) You are not logged in 
CSDb User Forums

Forums > C64 Coding > Freezer test-programs?
2018-01-20 15:01

Registered: Sep 2003
Posts: 1168
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

Registered: Dec 2001
Posts: 8608
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

Registered: Jan 2008
Posts: 242
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

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

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

Registered: Sep 2003
Posts: 1168
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

Registered: Sep 2003
Posts: 1168
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

Registered: Aug 2004
Posts: 812
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

Registered: Sep 2003
Posts: 1168
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

Registered: Jan 2008
Posts: 242
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

Registered: Sep 2003
Posts: 1168
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

Registered: Jan 2008
Posts: 242
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
Users Online
Jailbird/Booze Design
Perff/No Name
Guests online: 58
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 Comaland 100%  (9.6)
5 The Shores of Reflec..  (9.6)
6 Wonderland XII  (9.6)
7 Lunatico  (9.6)
8 We Come in Peace  (9.5)
9 Incoherent Nightmare  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 FMX Music Demo  (9.6)
2 Daah, Those Acid Pil..  (9.5)
3 Pandemoniac Part 2 o..  (9.5)
4 Party Horse  (9.5)
5 Treu Love [reu]  (9.5)
6 Merry Xmas 2017  (9.4)
7 Arok 20 Invitation  (9.4)
8 Dawnfall V1.1  (9.4)
9 In Memoriam BHF  (9.4)
10 Dawnfall  (9.4)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.4)
4 Finnish Gold  (9.4)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.9)
2 Veto  (9.8)
3 Mirage  (9.7)
4 Jailbird  (9.6)
5 Hein  (9.5)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.058 sec.