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 > 100% versions..? Party versions..? etc..?
2018-11-19 22:21
Raistlin

Registered: Mar 2007
Posts: 680
100% versions..? Party versions..? etc..?

So, I was wondering ...

Both "Delirious 11" and "X Marks the Spot" have the RESTORE key crash... and "X Marks" has a last minute glitch that crept in...

For myself I'd love to release a 100% version ... but I also kinda wouldn't - because doing so "dirties" the CSDB releases somewhat ... there'd then be something like an "X Marks Party Version" and "X Marks 100% Version" sullying the charts ........

I know Comaland had a 100% version, I can see it right now sat nicely at #2 in the charts ... but that version has more changed since the party version than what I'd likely do...

What do others think? Leave the demos alone and move on .. or go back and fix them.
2018-11-19 22:24
chatGPZ

Registered: Dec 2001
Posts: 11386
fix it before you release it i say.
2018-11-19 22:29
iAN CooG

Registered: May 2002
Posts: 3193
New and improved after party versions are more than welcome and need their own entry, nothing weird or shameful, on the contrary, shows that there is care on making the productions made 100% working. Everyone knows party version can be bugged, those can be fixed later. No news.
Surely if it's just a restore key blocker there's no much point in making a new version IMHO.
2018-11-19 22:30
Raistlin

Registered: Mar 2007
Posts: 680
Bah, I've been away from the scene for 27 years .. I forgot about this RESTORE key crash thing - if I ever knew about it in the first place (I have a vague recollection of it ... but at my age, I might be confusing it with something entirely different).

Someone mentioned it to me right before the demo compo at X ... a sort of "you should look into the RESTORE key thing for the next demo .. and hope that those guys upstairs don't press it during the demo."
2018-11-19 22:42
Raistlin

Registered: Mar 2007
Posts: 680
"Surely if it's just a restore key blocker there's no much point in making a new version IMHO." .. can a 100% version be attached to an existing entry as an additional download..?

The other thing that I wanted to fix was a single-frame D011 flicker on the first waves-part of the demo ... it really stands out (to me at least).

That's really all I wanted to look at for X Marks..
2018-11-20 00:40
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
can a 100% version be attached to an existing entry as an additional download..?

no, new release, new entry
2018-11-20 01:11
Smasher

Registered: Feb 2003
Posts: 520
what Ian Coog said.
2018-11-20 05:57
Oswald

Registered: Apr 2002
Posts: 5094
anyone pressing restore, should be awarded with a nice crash. never cared about that thing.
2018-11-20 08:11
Oswald

Registered: Apr 2002
Posts: 5094
also not always blockable, sometimes you want to use nmi with timers for something.
2018-11-20 08:15
JackAsser

Registered: Jun 2002
Posts: 2014
@Raistilin: Just don't bother. :)
2018-11-20 10:57
Krill

Registered: Apr 2002
Posts: 2980
Quoting Oswald
also not always blockable, sometimes you want to use nmi with timers for something.
NMI usage or not, it's always possible to prevent crashes when pressing restore.
2018-11-20 11:28
ChristopherJam

Registered: Aug 2004
Posts: 1409
While we're talking about post compo patches...

Slightly improved versions released after voting closes, but before results released, for an online compo... Out of compo but still at event? Or standalone release?

(obviously I have Reutastic 100% in mind as a case in point)
2018-11-20 12:28
MagerValp

Registered: Dec 2001
Posts: 1078
I've never understood the restore protection fetish. It's the system soft reset key, of course it causes a crash if you press it at the wrong moment. Heck, make it cleanly exit to basic if you feel the need to handle it somehow.

And if you're watching a demo, why the hell would you be pressing restore?
2018-11-20 12:30
chatGPZ

Registered: Dec 2001
Posts: 11386
i like to make it "crash gracefully". ie do something silly. perhaps format the disk. or something :)
2018-11-20 13:25
Peiselulli

Registered: Oct 2006
Posts: 81
Quote: Quoting Oswald
also not always blockable, sometimes you want to use nmi with timers for something.
NMI usage or not, it's always possible to prevent crashes when pressing restore.


Only with restrictions. If you want to get the NMI stable with the timer method (NMI vector pointing to $dd04), you will have 63 different addresses in the code that could be reached, not about 10 as in normal use case. And you need also an extra check to distinguish between a timer NMI and the restore key.
2018-11-20 14:14
MagerValp

Registered: Dec 2001
Posts: 1078
It's a waste of bytes, cycles, and brainwaves that are better spent making something interesting.
2018-11-20 20:08
Krill

Registered: Apr 2002
Posts: 2980
Quoting Peiselulli
Only with restrictions. If you want to get the NMI stable with the timer method (NMI vector pointing to $dd04), you will have 63 different addresses in the code that could be reached, not about 10 as in normal use case. And you need also an extra check to distinguish between a timer NMI and the restore key.
Set CIA2 timer A period to 9 cycles and set CIA2 timer B to count 7 timer A underflows (9 cycles * 7 = 63 cycles), then let timer B trigger interrupts, NMI vector still pointing to timer A counter ($dd04).

Et voilà, one timer NMI per rasterline with only 9 interrupt handlers (maximum variance is 8 cycles). No need to check for restore (i.e., rule out the timer interrupt condition). Glitches caused by pressing restore generally aren't avoidable anyways with active NMIs, but i still maintain that crashes are.

That said, i think it's a nice touch to handle restore gracefully (you might accidentally hit it), just like hidden parts, nice dir-art, shift lock to stay at the current part, or a user mode to play with. None of those are required for a good demo, of course.
2018-11-20 21:28
soci

Registered: Sep 2003
Posts: 480
I think I must ask the following rhetoric question:

What's the worst case interrupt latency of the following code sequences in cycles?
1.
clc
bcc *+2
rts

2.
ldx #1
bne *+2
lsr $1000,x

3. 
ldx #1
bne *+2
isb ($10,x)

No page boundary crossing.
2018-11-20 21:39
Krill

Registered: Apr 2002
Posts: 2980
Obvious rhetorical answer: 42.
2018-11-20 21:45
soci

Registered: Sep 2003
Posts: 480
Not quite as much. It's 8 to 10.
2018-11-20 21:46
Oswald

Registered: Apr 2002
Posts: 5094
"Set CIA2 timer A period to 9 cycles and set CIA2 timer B to count 7 timer A underflows (9 cycles * 7 = 63 cycles), then let timer B trigger interrupts, NMI vector still pointing to timer A counter ($dd04).

Et voilà, one timer NMI per rasterline with only 9 interrupt handlers "

instant erect penis. thats beautiful :)
2018-11-20 22:14
Krill

Registered: Apr 2002
Posts: 2980
Quoting soci
Not quite as much. It's 8 to 10.
Not so rhetorical a question then, eh? :)

Anyways, yes, point taken. So 21 interrupt handlers with the two-timers setup in the worst case. And well, the extra interrupt handlers only reachable by hitting restore would just be an RTI each, anyways.

However... all 8-cycle instructions are undocs, and thus the maximum interrupt delay for "legal" code would be 9 cycles, which fits neatly with the 9-7 scheme.
2018-11-20 22:36
Raistlin

Registered: Mar 2007
Posts: 680
Thanks everyone :-)

I'll have a think about this... I've never played much with the CIA timers to be honest... and I've no idea whether that's allowed when using Spindle? I'll see...
2018-11-20 22:40
Krill

Registered: Apr 2002
Posts: 2980
Perfectly fine with other loaders that have optional frameworks. :)

Be aware of different CIA revisions vs. different interrupt delay, though.
2018-11-20 23:14
soci

Registered: Sep 2003
Posts: 480
Still the 7 cycle modify absolute indexed instructions (like LSR $1000,x) need to be avoided as jump targets. The 9*7 scheme can compensate up to 8 cycles only.

But this special case shouldn't be too difficult to avoid in practice.
2018-11-20 23:21
hedning

Registered: Mar 2009
Posts: 4732
Just ignore the restore-thing, Raistlin. It’s no flaw. What I said at X was ”don’t tell Burglar not to press Restore, as that might trigger him to actually press it” ;) If people feel a need to press restore during the demo, let them have the reward they deserve.
2018-11-20 23:26
Copyfault

Registered: Dec 2001
Posts: 478
Quoting soci
I think I must ask the following rhetoric question:

What's the worst case interrupt latency of the following code sequences in cycles?
1.
clc
bcc *+2
rts

2.
ldx #1
bne *+2
lsr $1000,x

3. 
ldx #1
bne *+2
isb ($10,x)

No page boundary crossing.
The relevant question is: what range of interupt latency are we dealing with? I.e., how many different states do we have upon entering the irq?

IIRC, when I examined this long ago, I found this (going through the examples above):
for 1. min latency of +1 (irq happens on 1st cycle of "clc"), max latency of +7 (irq occurs on 2nd cycle of bne)
-> 7 different states

for 2. min latency of +1, max latency of +8
-> 8 different states

for 3. min latency of +1, max latency of +9
-> 9 different states
Thus, the 9*7-method presented by Krill should work on any "legal code usage"-occasion. Unless you want to cover the difference between old and new cia by treating it as an additional latency cycle (which would raise the no. of states given above by one in every case).

Correct me if I'm wrong, but I'm rather sure that the behaviour was like this...
2018-11-20 23:53
Krill

Registered: Apr 2002
Posts: 2980
If i read Cycles to get into IRQ routine correctly, there are 9 different timer values (8 cycles jitter) for "legal" instructions in the branch-to-same-page case.

11 different values would be the maximum: add one for "illegals" and another one for raster IRQ on line 0, which doesn't apply here.
2018-11-21 00:08
soci

Registered: Sep 2003
Posts: 480
I was wrong, sorry.

Copyfault is right, the taken branch is only adding a single cycle and therefore 9 interrupts will covers all cases, including illegal opcodes.

More testing and less talking for me next time ;)
2018-11-21 09:29
ChristopherJam

Registered: Aug 2004
Posts: 1409
So, back to the original topic - are 101% versions released during or shortly after party "outside compo" releases? Or not associated with party?
2018-11-21 10:26
hedning

Registered: Mar 2009
Posts: 4732
Quote: So, back to the original topic - are 101% versions released during or shortly after party "outside compo" releases? Or not associated with party?

They are not related to the compo at all, as they weren't released during the compo, nor competing in it. :)
2018-11-21 10:39
Smasher

Registered: Feb 2003
Posts: 520
Quote:
What I said at X was ”don’t tell Burglar not to press Restore, as that might trigger him to actually press it” ;)

ROTFL
2018-11-21 11:01
Peiselulli

Registered: Oct 2006
Posts: 81
The only disadvantage of Krills proposal that I see is that you cannot use $dd04 and $dd05 any more to put a jump directly into the CIA timer A, so you can only jump indirectly with jmp ($dd04).
And no, I don't want to store code into data direction registers of the CIAs.
2 cycles wasted ...
2018-11-21 11:58
ChristopherJam

Registered: Aug 2004
Posts: 1409
The Burglar cannot push restore if you disable his hand!
2018-11-21 13:44
Krill

Registered: Apr 2002
Posts: 2980
Quoting Peiselulli
The only disadvantage of Krills proposal that I see is that you cannot use $dd04 and $dd05 any more to put a jump directly into the CIA timer A, so you can only jump indirectly with jmp ($dd04).
And no, I don't want to store code into data direction registers of the CIAs.
2 cycles wasted ...
Alright, then how about this:

Have the 63-cycle period in a CIA2 timer (A or B does not matter) and let it trigger interrupts (NMIs).
Then have the 9-cycle counter in CIA1 timer B. CIA1 timer A counter registers $dc04/05 are free to use for the JMP opcode $4c and the jump address lo-byte. The jump address hi-byte is $dc06 (the current cycle counter of timer B), so you can point the NMI vector to $dc04.

That is, the second timer does not need to count underflows of the other timer. Both merely need to be synchronised, which is only a matter of starting them at the correct time, as both are running with the same clock.
2018-11-21 13:47
Oswald

Registered: Apr 2002
Posts: 5094
Gunnar why dont you code shit anymore, you still got it :) what a waste
2018-11-21 13:50
Krill

Registered: Apr 2002
Posts: 2980
Who said i ever stopped? :)

Zoompinski [512 bytes]
Grey Screen with No Music [2+4 bytes]
Krill's Loader, Repository Version 166
The Cyan Goddess

(And no worries, there's still real stuff in the pipeline.)
2018-11-21 15:55
Oswald

Registered: Apr 2002
Posts: 5094
misc small shit, we need +h2k19 :)
2018-11-21 16:44
Burglar

Registered: Dec 2004
Posts: 1101
new at X: The Press Restore Compo

you can win the RESTORE award if you can crash more demos than everybody else! :)
2018-11-21 17:57
Compyx

Registered: Jan 2005
Posts: 631
Quoting Oswald
misc small shit, we need +h2k19 :)


Yeah, anyone can write that loader in about a week ;)
2018-11-22 11:39
Peiselulli

Registered: Oct 2006
Posts: 81
@Krill : still the problem is not solved of writing values to $d011 at the wrong time (without extras checks this will happen), which results in shifting bad lines all over your screen layout. Also a problem is running into unintended VSP problems.
2018-11-22 12:37
ChristopherJam

Registered: Aug 2004
Posts: 1409
Quoting MagerValp
I've never understood the restore protection fetish. It's the system soft reset key, of course it causes a crash if you press it at the wrong moment. Heck, make it cleanly exit to basic if you feel the need to handle it somehow.

And if you're watching a demo, why the hell would you be pressing restore?


Hard this ^

I mean, ok, if you're not using NMI at all you can trivially disable it, but any time it's enabled you're at risk of being interrupted when you're doing something potentially time critical.. and, as the only reason to enable it is to do time critical things, you're pretty much guaranteed to be vulnerable to the restore key the moment you make anything dependent on the relevant timer interrupt.
2018-11-22 13:03
Krill

Registered: Apr 2002
Posts: 2980
Quoting Peiselulli
@Krill : still the problem is not solved of writing values to $d011 at the wrong time (without extras checks this will happen), which results in shifting bad lines all over your screen layout. Also a problem is running into unintended VSP problems.
As i said, glitches aren't avoidable. But they are temporary. (And before you say VSP crash, okay, but that's a pretty low probability to begin with, given that VSPs don't happen in the normal case. So low this would probably only happen after frantically hitting restore repeatedly for quite some time. And then yes, the hitter really deserves a crash.)
2018-11-22 13:15
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
frantically hitting restore repeatedly

<mrsid> cjam: It's the only fun I get in life! :)
2018-11-22 15:19
Oswald

Registered: Apr 2002
Posts: 5094
why to do it ?

'disabling' restore was cool and secret knowledge, when we were kids, but those times are over.
2018-11-22 16:02
Dano

Registered: Jul 2004
Posts: 234
Does anyone care for more than one drive on the bus in a democontext? I guess this happens far more often than anyone really pressing Restore in a demo.. ^^
2018-11-22 16:02
chatGPZ

Registered: Dec 2001
Posts: 11386
most of the time these days there are zero (real) drives on the bus :D
2018-11-22 17:11
Raistlin

Registered: Mar 2007
Posts: 680
@Burglar (and other compo organisers): since it's you guys we mostly need to worry about with compos... can you guarantee no RESTORE key pressing? It might make sense to add into the notes/rules that "RESTORE key won't be pressed" ;-)

And... I'll not bother fixing the RESTORE key thing since it sounds like it's a nightmare. I -did- notice that even with what I thought should be a fix, I was getting issues on one part of the demo regardless. The part where I was doing lots of NMIs etc. So it did seem like it wouldn't be so trivial to 100% fix anyway...
2018-11-22 17:17
Frantic

Registered: Mar 2003
Posts: 1648
If I will ever organize a LCP or BFP party again, I'll borrow Goto80's one fingered robot and have that press the restore key at random points in time during the compo.
2018-11-22 17:21
MagerValp

Registered: Dec 2001
Posts: 1078
The demo compo at Datastorm 2019 will be replaced by a restore pressing compo. Your entry will be expected to hook into the NMI vector, and the operator will hammer restore to drive the demo forward.
2018-11-22 18:09
Raistlin

Registered: Mar 2007
Posts: 680
I'm adding secret parts to my next demo where if the RESTORE is pressed, and the demo manages not to crash, a picture of the party organisers "having fun together" will appear :-p
2018-11-22 19:29
Frantic

Registered: Mar 2003
Posts: 1648
Sorry, but the compo rule "lameness is forbidden" will rule that possibility out.
2018-11-22 19:35
Perplex

Registered: Feb 2009
Posts: 255
Look out for our upcoming demo: 2021 - A Press Restore Odyssey. To be linked live at LCP.
2018-11-22 20:52
Raistlin

Registered: Mar 2007
Posts: 680
Quote: Sorry, but the compo rule "lameness is forbidden" will rule that possibility out.

Damn... well to be honest that rule rules me out entirely regardless ...
2018-11-23 08:27
Krill

Registered: Apr 2002
Posts: 2980
Quoting dano
Does anyone care for more than one drive on the bus in a democontext? I guess this happens far more often than anyone really pressing Restore in a demo.. ^^
At least two people care. :)

User Comment
Submitted by Jak T Rip [PM] on 15 August 2018
***WOOOOOW***

Finally:
- multiple drives on the bus allowed despite 2bit+ATN protocol (world-first)

That's a game changer... at least now I have to consider changing my game Pac It to use it... ;)

Extremely stunning!
2018-11-23 20:13
Burglar

Registered: Dec 2004
Posts: 1101
@raistlin, obviously common sense is generally applied, so I'm pretty confident Mr.Ammo won't hammer any keys while entries are running on his compo machines ;)

on the other hand, the more I tell you not to think of a pink elephant...
2018-11-24 11:39
Tim

Registered: May 2003
Posts: 77
Hmmm, we are discussing the restore bug but I haven't heard anybody about the on/off button bug yet. I am not a coder but I heard pressing it crashes demos too...
2018-11-24 14:08
Krill

Registered: Apr 2002
Posts: 2980
That's probably because there's a power switch, but not an on/off button. :)
2018-11-24 14:16
Golara
Account closed

Registered: Jan 2018
Posts: 212
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
LightSide
Flashback
Paladin/G★P
RetroGL
Nith/TRIɅD
CreaMD/React
pcollins/Quantum
Guests online: 85
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.114 sec.