Author Topic: About YAP!  (Read 3680 times)

0 Members and 1 Guest are viewing this topic.

Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
  • Liked: 175
Re: About YAP!
« Reply #10 on: 08:39, 22 March 14 »
Hi early birds! (It's 7:15 on a Saturday morning and I'm up! :o)

Quote from: MacDeath
We made a few palette tests (...)
Actually Hermol and you are the ones who have created last palette (purple+green). :)
But also, about this last fx (blanking only half of the (green) palette to simulate a wavy background):
it was not part of the shown preview; it was part of the wasted previous tests I've shown asides.
When I've asked: "what do you think: should I put this one?" I remember you guys have shouted "YES!". ;D

Quote from: MacDeath
the "classic overused" blue-to-cyan and red-to-yellow are not overused for nothing. those are the only 2 smooth long palettes possible.
May be cool, if possible to get this with not 2 long palettes gradiants but perhaps 3 shorter ones...
I'm not fond of "modern" palettes.
What I like in these "classic overused" palettes, it is that it relies on RGB components values: "coder colors"? :D
Also: might be classic for CPCers; but could be the best "ambassador" for non-CPCers to show "our" native ;) colors.

Trying 3 gradiants? nice idea. You still have the dsk with basic launcher to test palettes, don't you?
Feel free to perform your own tests and post them. That said, might be a bit late! :P
You should keep your time to go on working on our secret big project to be released in 2016.  8)

Tcho!
OVF/Logon System
Unregistered from CPCwiki forum.

Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
  • Liked: 175
Re: About YAP!
« Reply #11 on: 09:03, 22 March 14 »
Back to "pokes list" versus "events list".
When reading Ralferoo's post, I believe I may have not been clear enough. :-[

Let's say we want as events:
- after 0.5 second, switch palette
then
- after 1 second, go down instead of going up.

As an events list, it would be
Code: [Select]
events_list
    db 25 :  dw event1     ; 0.5 second is 25 frames to wait for
    db 50 :  dw event2     ;   1 second is 50 frames to wait for

; called events
event1  ld hl,new_palette:ld (adr_palette+1),hl:ret
event2  ld a,#2B: ld (adr_incdec),a:ret

;somewhere in code
adr_palette
    ld hl,old_palette

;somewhere else
adr_incdev
    inc hl ; ==#23 while #2B== dec hl


As a pokes list, it could be
Code: [Select]
pokes_list
    db 25+#80 :  dw adr_palette+1 : dw new_palette  ; +#80 stands for: pokes 2 bytes
    db 50+#40 :  dw adr_incdec    : db #2B          ; +#40 stands for: pokes 1 byte

;somewhere in code
adr_palette
    ld hl,old_palette

;somewhere else
adr_incdev
    inc hl ; ==#23 while #2B== dec hl

The main idea is:
somehow, an event is only a list of pokes;
instead of listing events , let's list the pokes
to avoid wasting bytes on always same kind of opcodes (those to poke).

OVF/Logon System
« Last Edit: 09:07, 22 March 14 by Overflow »
Unregistered from CPCwiki forum.

Offline ralferoo

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.073
  • Country: gb
  • Liked: 577
Re: About YAP!
« Reply #12 on: 11:37, 22 March 14 »
Oh, right, it's still a list rather than code! Yeah, that's not at all like what I thought you meant! When it's formatted like that, though,  it looks a lot like a copperlist for the Amiga... :)


Coincidentally the demo I'm currently working on (the tape loader) does make use of a similar method - it's data driven but it's more like a signal rather than a VBL count as events depend on tape data which can't be guaranteed to take the same length of time each time. I'll explain more when the demo is released and you can see what I'm talking about... :)


Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
  • Liked: 175
Re: About YAP!
« Reply #13 on: 13:14, 22 March 14 »
Quote from: Gryzor
Thanks for doing that; didn't understand half of it, but very interesting read!
Quote from: Overflow
About the curves (...)
I am assuming that the curve is continuous, and its slope does not change much.
Briefly? ddV is from [-1,0,1] , 5 ddV are stored in 1 byte (3^5=243 <256)
One loop to get a new V value for the curve is:
    read ddV from stored data
    dV = dV + ddV
    V = V + dV
I believe this was not clear neither.  :-[
Let's say I'd like to pre-crunch some V values.
    V
    0
    1
    2
    2
    1
    -1
    -3
    -6
    ...

Instead of storing value V, its slope dV can be stored: dV = V minus its previous value.
Nice! assuming that V is an 8 bit value, dV surely can be stored on 4 (3?) bits.
    V          dV
    0
    1          1
    2          1
    2          0
    1          -1
    -1          -2
    -3          -2
    -6          -3
    ...

Now instead of storing dV, ddV can be stored. ddV= dV minus its previous value.
    V          dV          ddV
    0
    1          1
    2          1          0
    2          0          -1
    1          -1          -1
    -1          -2          -1
    -3          -2          0
    -6          -3          -1
    ...

[-1,0,1] these are 3 values; I can stock 5 of them into 1 byte
(since 3 ^ 5 = 243 which is < 256 = 1 byte)
 
Finally, this is a pre-crunch with a 1:5 ratio.
 
I've tried o explain the best I could, with my words.
Again: is there any theory about this kind of data storing?
Starting point: assuming that ddV has only 3 values -1,0 or +1.
 
"Et voilĂ !" :)
 
 
Unregistered from CPCwiki forum.

Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
  • Liked: 175
Re: About YAP!
« Reply #14 on: 13:16, 22 March 14 »
(...) looks a lot like a copperlist for the Amiga... :)
Try the DMA-list from the 6128+.  ;D
Unregistered from CPCwiki forum.

Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.012
  • Country: fr
  • Liked: 1020
Re: About YAP!
« Reply #15 on: 23:05, 22 March 14 »
Quote
You still have the dsk with basic launcher to test palettes, don't you?
lol no, you erased it or took it back home, too afraid I may/would release it before your release...  :laugh: