In the making: Arukanoido – an Arkanoid clone

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: In the making: Arukanoido – an Arkanoid clone

Post by tokra »

pixel wrote: Thu Nov 02, 2023 2:12 pm
tokra wrote: Thu Nov 02, 2023 2:02 pm - paddle-jitter is worse on PAL than on NTSC, but not really nice in either case. You can see the Vaus flickering in the videos. Would really appreciate the dejittering-technique reactivated

- entering the high-score is impossible with paddles right now. The paddle-area from A to Z seems very small, you can see in the videos that it always flickers between 2 characters. Also when I press Fire most of the time all 3 letters are set at once, the routine needs to check for fire and release I think
I'll grab the real thing till Saturday and see for myself. Works fine with VICE. :(
How many different "letters" does the high-score list allow? If it is 32 you could just disregard the lowest 3 bits of the paddle-register and only change the letter on the 2^3-bit.

Also: For high-score-list entries I'd always check for button pressed and button released before accepting the letter, that way you make sure to get no accidental doubles.
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: In the making: Arukanoido – an Arkanoid clone

Post by pixel »

tokra wrote: Thu Nov 02, 2023 2:34 pm How many different "letters" does the high-score list allow? If it is 32 you could just disregard the lowest 3 bits of the paddle-register and only change the letter on the 2^3-bit.
"ABCDEFGHIJKLMNOPQRSTUVWXYZ.! " – almost 32. ;) Ah... only killed the lowest two bits. Thanks.
tokra wrote: Thu Nov 02, 2023 2:34 pm Also: For high-score-list entries I'd always check for button pressed and button released before accepting the letter, that way you make sure to get no accidental doubles.
As far as I can see it only enters an initial with fire released. Will give it a closer look later. Guess a code review is in order anyhow.
New demo tomorrow! And thank you again.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: In the making: Arukanoido – an Arkanoid clone

Post by beamrider »

pixel wrote: Thu Nov 02, 2023 2:12 pm
tokra wrote: Thu Nov 02, 2023 2:02 pm - the high-score music is very nice but it sounds kind of "schrabbelig" when more than 1 voice is playing at the same time. What is the volume you are playing this at? When using more than one voice you need to reduce the volumer-register to avoid this effect. Frogger'07 had this as well. Mike can explain more about the background of this. So if you play at 15 (full volume) this is too much. I think Frogger'07 used a general volume of 8 or 7 in the end.
That's for beamrider to fix! :D Can remember that extensive thread where people pulled out their oscilloscopes... around 2014 or so?
I took a quick look and I only ever set the volume to 8 so unless it maybe getting set higher - but not intentionally at least. Btw, it sounded fine on my 1702 monitor will check again tomorrow on real hardware.

edit: Checked in VICE monitor and volume only gets set to 8.
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: In the making: Arukanoido – an Arkanoid clone

Post by tokra »

beamrider wrote: Thu Nov 02, 2023 5:22 pm I took a quick look and I only ever set the volume to 8 so unless it maybe getting set higher - but not intentionally at least. Btw, it sounded fine on my 1702 monitor will check again tomorrow on real hardware.

edit: Checked in VICE monitor and volume only gets set to 8.
You're right. Wonder where the distortions come from then. I seem to remember the more voices play simultaneously the lower the volume needs to be. Is it possible to have the music-program separetely with adjustable volume like a POKE before starting it? I'd like to experiment with this a little, but it would be cumbersome to extract the music from Arukanoido first...
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: In the making: Arukanoido – an Arkanoid clone

Post by beamrider »

PM sent.

btw, it could also be your TV, LCD TVs are not known for having the best sound. Try connecting to some powered speakers etc?
mathop
Vic 20 Amateur
Posts: 40
Joined: Thu Aug 12, 2021 3:13 pm

Re: In the making: Arukanoido – an Arkanoid clone

Post by mathop »

I did an audio capture of the high score music.
Here are 3 waveforms from the same sample from different VIC20s (VIC20 CR model, NTSC 'old' (2-prong power), PAL old.)
vicsamples.png
The NTSC old model is the clear winner here with 4 distinguishable levels corresponding to 3 voices. The other models all sound slightly to horribly distorted.
Audio clipping could be due to the VIC chip itself or the amplifier circuit on the board.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: In the making: Arukanoido – an Arkanoid clone

Post by Mike »

tokra wrote:[...] I seem to remember the more voices play simultaneously the lower the volume needs to be. [...]
Quite some time ago, I hypothesized the audio output of VIC-I to be a current source controlled by the volume (4 push FETs) and 4 current sinks (i.e., pull FETs) corresponding to each of the voices being low level, and to quote from there:
Mike wrote:The data sheet explicitly states 'Composite Sound (Pin 19)' is a high impedance output with R_out ~= 1 kOhm, and needs to be buffered. It can't really be open-collector as there is no pull-up present on both common PCB revisions.

I would suspect the four bits of the volume register form part of a variable internal current source, the four bits of the sound generators form part of a variable current drain, and both sides playing 'tug of war' during operation. The FETs of the current drain have inverted inputs, so they conduct when the corresponding output of the generator is off.

[...]
The pull FETs themselves also only have a limited current sinking capability. Otherwise we would only get an AND of all ON voice bits. The arrangement then looks roughly like this, with switches and resistors to replace the FETs (warning, ASCII art!):

Code: Select all

----+---------+---------+---------+ +5 V
    |         |         |         |
    |         |         |         |
    o         o         o         o
     \ A       \ B       \ C       \ D
      \         \         \         \
    o         o         o         o
    |         |         |         |
    |         |         |         |
   +-+       +-+       +-+       +-+
   | | 1K    | | 2K    | | 4K    | | 8K
   | |       | |       | |       | |
   | |       | |       | |       | |
   +-+       +-+       +-+       +-+
    |         |         |         |
    |         |         |         |
    |         |         |         |
    +---------+---------+---------+---- sound output VIC pin 19
    |         |         |         |
    |         |         |         |
    |         |         |         |
   +-+       +-+       +-+       +-+
   | | "R"   | | "R"   | | "R"   | | "R"
   | |       | |       | |       | |
   | |       | |       | |       | |
   +-+       +-+       +-+       +-+
    |         |         |         |
    |         |         |         |
    o         o         o         o
     \ E       \ F       \ G       \ H
      \         \         \         \
    o         o         o         o
    |         |         |         |
    |         |         |         |
----+---------+---------+---------+ 0 V

A: closed, when bit 3 (value 8) of volume = 1
B: closed, when bit 2 (value 4) of volume = 1
C: closed, when bit 1 (value 2) of volume = 1
D: closed, when bit 0 (value 1) of volume = 1

E: closed, when output of sound channel $900A = 0
F: closed, when output of sound channel $900B = 0
G: closed, when output of sound channel $900C = 0
H: closed, when output of sound channel $900D = 0

"R": around 1K, but limited to a maximum current of 1(?) mA
Note, the given resistance values and the maximum current of "R" when in saturation are only rough guesses!

Silent voices let their respective pull FET act as current sink. When three voices are silent, the remaining voice only needs to switch 1/4 the maximum possible current from the (volume controlled!) push stage, and everything's fine. Sometimes however, depending on the state of the noise FET, the sound is a little bit muted as the noise FET can get stuck in the non-conducting state when the noise channel is switched off (bit 7 = 0).

With more voices active, it is more likely to get the pull FETs into saturation (statistically fewer of them momentarily act as current sinks). When this happens, you get the distortions. For this reason, it is best to reduce the volume to 8 (or less) when two voices are active. For three voices, the volume should be set to 5 or 4. With all four voices in use, volume definitely should not be more than 4.

Greetings,

Michael

P.S. see also the schematics I reversed for a User Port DAC here: https://sleepingelephant.com/ipw-web/bu ... 87&start=5
User avatar
huffelduff
Vic 20 Hobbyist
Posts: 118
Joined: Sat Sep 05, 2020 9:14 am

Re: In the making: Arukanoido – an Arkanoid clone

Post by huffelduff »

Mike wrote: Sat Nov 04, 2023 11:52 am When this happens, you get the distortions. For this reason, it is best to reduce the volume to 8 (or less) when two voices are active. For three voices, the volume should be set to 5 or 4. With all four voices in use, volume definitely should not be more than 4.
Ah ha, another good nugget.

Thanks a bunch

H
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: In the making: Arukanoido – an Arkanoid clone

Post by pixel »

Courtesy of beamrider here's one with lower volume. Possibly with another bug fix. Not sure yet.
Attachments
arukanoido.demo.1539.zip
(650.33 KiB) Downloaded 62 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: In the making: Arukanoido – an Arkanoid clone

Post by tokra »

Tried the latest version. The high-score music sounds much better now. I think the standard "Game Over"-music would also sound better with volume 4.

Sadly entering a high-score with the paddle is still impossible. It still flickers between two letters mostly, although on some positions it is a little better than before.
Ah... only killed the lowest two bits
I think you should be able to kill the third lowest bit as well and should still be able to distinguish between 32 different conditions.

One tiny thing I noticed, but was not able to reproduce: The raster-flicker of the spaceship was not on the spaceship but in the lower left of the border on first start. Could not reproduce after reset or power-cycle. Maybe depends on some values in RAM being set?
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: In the making: Arukanoido – an Arkanoid clone

Post by pixel »

tokra wrote: Mon Nov 06, 2023 12:24 pm Tried the latest version. The high-score music sounds much better now. I think the standard "Game Over"-music would also sound better with volume 4.
I think the hiscore music is a tad too quiet. Checked your hardware yet?
tokra wrote: Mon Nov 06, 2023 12:24 pm Sadly entering a high-score with the paddle is still impossible. It still flickers between two letters mostly, although on some positions it is a little better than before.
I put the un-jittering thing back in for the hiscore. (Could have occurred to me earlier.) As usual I didn't get to grab that real machine. My life sucks.
tokra wrote: Mon Nov 06, 2023 12:24 pm
Ah... only killed the lowest two bits
I think you should be able to kill the third lowest bit as well and should still be able to distinguish between 32 different conditions.
That's already happening since you mentioned it the last time. 8)
tokra wrote: Mon Nov 06, 2023 12:24 pm One tiny thing I noticed, but was not able to reproduce: The raster-flicker of the spaceship was not on the spaceship but in the lower left of the border on first start. Could not reproduce after reset or power-cycle. Maybe depends on some values in RAM being set?
I'm tempted to blame cosmic radiation. Oh Lord! Still hunting another bug that cannot be reproduced. head -> wall. Am feeling as if I'd be in the wrong business. Things went on so much faster some time ago…

However:
arukanoido.demo.1542.zip
(650.67 KiB) Downloaded 48 times
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: In the making: Arukanoido – an Arkanoid clone

Post by beamrider »

I'll have a listen on my real Vic into a Commodore monitor. Maybe we can compromise at 6...
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: In the making: Arukanoido – an Arkanoid clone

Post by tokra »

pixel wrote: Mon Nov 06, 2023 1:26 pm I think the hiscore music is a tad too quiet. Checked your hardware yet?
Yes, it is quieter than the rest now that plays at volume 8, but at least there are not distortions anymore. Alternatively the whole game needs to be at volume 4 or 5, but as beamrider pointed out by PM some other effects depend on decaying volume. So it is a trade-off either way.
pixel wrote: Mon Nov 06, 2023 1:26 pm I put the un-jittering thing back in for the hiscore. (Could have occurred to me earlier.) As usual I didn't get to grab that real machine. My life sucks.
Sadly, it still jitters on most letters, making it impossible to make sure the correct name is entered. Maybe not so important anyway, since it is not written back anywhere for posterity. Alternatively could one just use the keyboard instead?

Or there needs to be some external hardware device that dejitters the paddle-input similar to what the Micromys does. But that is beyond the scope of this game...
User avatar
pixel
Vic 20 Scientist
Posts: 1358
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: In the making: Arukanoido – an Arkanoid clone

Post by pixel »

tokra wrote: Mon Nov 06, 2023 4:07 pm Sadly, it still jitters on most letters, making it impossible to make sure the correct name is entered. Maybe not so important anyway, since it is not written back anywhere for posterity. Alternatively could one just use the keyboard instead?
Well, if there's no other way...
tokra wrote: Mon Nov 06, 2023 4:07 pm Or there needs to be some external hardware device that dejitters the paddle-input similar to what the Micromys does. But that is beyond the scope of this game...
What's the average jitter btw?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: In the making: Arukanoido – an Arkanoid clone

Post by Mike »

pixel wrote:What's the average jitter btw?
It is not possible to make a reliable statement on this.

The amount of jitter depends on the exact VIC chip in use, on the actual position (it may be different for lower vs higher values) and whether the readout is asynchronous to the video display or not.

I gave a thorough analysis of this in the Paddlescope thread. Please take a look at the YT videos tokra posted to get an idea how the paddle readout actually looks like. This is not just some noise or jitter, there is a strong correlation to the video DMA.

Just to give rough numbers what to expect: on my PAL VC-20, POTX is effectively jitter free (only some noise on the order of +/- 3 units) while POTY shows small 'spikes' correlated to the video DMA activity of the VIC chip (around 10 units). One of tokra's VIC-20s shows big spikes on both POTX and POTY on the order of 30 units, again correlated to video DMA.

In any case, you should do the readout of the POT% registers only in the top or bottom border area, as there then is least disturbance by the video DMA.
Post Reply