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


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

Registered: Sep 2003
Posts: 1161
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 20:29
Groepaz

Registered: Dec 2001
Posts: 8469
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 20:35
AlexC

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 20:41
Groepaz

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

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

Registered: Sep 2003
Posts: 1161
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 20:46
tlr

Registered: Sep 2003
Posts: 1161
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 10:52
ChristopherJam

Registered: Aug 2004
Posts: 777
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 12:57
tlr

Registered: Sep 2003
Posts: 1161
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 16:00
AlexC

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 19:17
tlr

Registered: Sep 2003
Posts: 1161
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 23:25
AlexC

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
Advanced
Users Online
Alakran_64
Kitty
insane/altair^rab^tscc
Guests online: 30
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Comaland 100%  (9.6)
6 We Come in Peace  (9.6)
7 Lunatico  (9.6)
8 Incoherent Nightmare  (9.5)
9 Wonderland XII  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 Dawnfall V1.1  (9.5)
2 Synthesis  (9.5)
3 FMX Music Demo  (9.5)
4 Pandemoniac Part 2 o..  (9.5)
5 Daah, Those Acid Pil..  (9.5)
6 Treu Love [reu]  (9.5)
7 Merry Xmas 2017  (9.4)
8 Dawnfall  (9.4)
9 Gubbdata 2017 Invite  (9.3)
10 SidRok  (9.3)
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 Hardware-Gurus
1 Soci  (9.9)
2 Wiesel  (9.9)
3 Grue  (9.8)
4 Zer0-X  (9.8)
5 Lemming  (9.7)

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