News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_zhulien

interesting walkthrough video coding a pet to play samples at 60khz

Started by zhulien, 18:18, 09 May 25

Previous topic - Next topic

Longshot, MaV and 1 Guest are viewing this topic.

BSC

Quote from: McArti0 on Yesterday at 06:13OUTI  ;5
INC B ;1
NOP  ;1
NOP  ;1

1000/8=125kHz
I love your comprehensive style of posting. You clearly explain why you have a certain opinion, provide evidence or links to existing code, awesome - not! I strongly doubt that what you claim here is possible. I did my fair amount of experiments with the AY in the last 10ish years and it never occurred to me that what you claim here is possible. At least not without glitches, on a real machine. 
** My website ** Some music

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

McArti0

Quote from: BSC on Yesterday at 12:46 I strongly doubt that what you claim here is possible.
Are you talking about dithering?
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
One chip driver for 512kB(to640) extRAM 6128
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

BSC

Quote from: McArti0 on Yesterday at 13:57
Quote from: BSC on Yesterday at 12:46 I strongly doubt that what you claim here is possible.
Are you talking about dithering?
No, the code snippet containing OUTI. 
** My website ** Some music

My hardware: ** Schneider CPC 464 with colour screen, 64k extension, 3" and 5,25 drives and more ** Amstrad CPC 6128 with M4 board, GreaseWeazle.

andycadley

Quote from: McArti0 on Yesterday at 11:22
Quote from: Targhan on 20:15, 12 May 25
Quote from: andycadley on 12:38, 12 May 25I have a sneaking suspicion you may not get audio on a Plus machine if you don't,
Yup, you're right!
Does any emulator show this?
It would be a very absurd design. Blocking the F4 port to switch something in F6? After all, AY works the same way.

I don't think so, most emulators will quite happily ignore situations where a real Plus keyboard stops responding for example.

You have to remember there is no 8255 in a Plus at all, the ASIC mimics it's behaviour based on the spec and also has to be able to do things like write to the AY regardless of PPI state (because DMA sound). So it can be very finicky about doing things the way they were supposed to be done, rather than what necessarily could be gotten away with.

lightforce6128

Quote from: McArti0 on Yesterday at 11:22
Quote from: Targhan on 20:15, 12 May 25
Quote from: andycadley on 12:38, 12 May 25I have a sneaking suspicion you may not get audio on a Plus machine if you don't,
Yup, you're right!
Does any emulator show this?
It would be a very absurd design. Blocking the F4 port to switch something in F6? After all, AY works the same way.

I tried on WinAPE. Configured to 6128 and 6128 plus it did not show a difference. In both cases it works. Would be good to know how different actual hardware behave.

@Targhan : Does "Yup, you're right!" mean: "I got the same feeling. I agree with this." Or does it mean: "I tried this on real hardware. It did not work as expected."

lightforce6128

Quote from: BSC on Yesterday at 12:46I did my fair amount of experiments with the AY in the last 10ish years and it never occurred to me that what you claim here is possible. At least not without glitches, on a real machine.

If it is possible on real hardware to send values continuously, there will be glitches (I know the term hazard for this). E.g. while switching between register selection and register update, if the PPI is not programmed to stop it will send the next register index also as register value for the last register index. For operation in music trackers where all or at least several registers are updated in a row this clearly needs to be considered.

But while playing a sample, only a single register is changed. If there is a glitch/hazard in the value, there will be a minimal creaking in the output until the right volume value arrives. But here we are talking about microseconds. Is this audible?

One detail question we can think about: The tone frequency of a channel is divided into two registers. What happens if one updates the first register, but is not fast enough to update the second? Does the PSG stops counting during these operations? Or does it simply continue and possibly will output a wrong frequency until the second register is also updated? Usually the ICs used back then do not contain buffers, caches, or complex internal logic, but simply do their main work and rely on a bit good will of the surrounding (e.g. timing).

Maniac

Quote from: lightforce6128 on Today at 02:30
Quote from: McArti0 on Yesterday at 11:22
Quote from: Targhan on 20:15, 12 May 25
Quote from: andycadley on 12:38, 12 May 25I have a sneaking suspicion you may not get audio on a Plus machine if you don't,
Yup, you're right!
Does any emulator show this?
It would be a very absurd design. Blocking the F4 port to switch something in F6? After all, AY works the same way.

I tried on WinAPE. Configured to 6128 and 6128 plus it did not show a difference. In both cases it works. Would be good to know how different actual hardware behave.

@Targhan : Does "Yup, you're right!" mean: "I got the same feeling. I agree with this." Or does it mean: "I tried this on real hardware. It did not work as expected."

Don't count on WinAPE being accurate for this. When I was patching Split Personalities to work on the Plus the audio was fine on WinAPE. When I then tested on my Plus it has odd sound interference. The emulator seems to take a few shortcuts with this side of things.

Powered by SMFPacks Menu Editor Mod