Decent beeper music requires fairly precise timing, which makes playing it while doing other things (which can take a variable amount of time) tricky. You tend to have to do a bit at the start of each frame and just accept that it will distort somewhat. And that's using up a fair whack of the best time to be drawing to the screen, so it's not ideal.Sparky wrote: ↑Wed Apr 28, 2021 2:46 pm I don't know why some of you think beeper music slows down games? They are loaded into memory using machine code, and made to repeat. Then, the game executes and plays. The effect of this is probably less than 5% of the overall speed.
P.S. I am talking about music, not sound effects.
Beeper music during gameplay/action
Re: Beeper music during gameplay/action
Re: Beeper music during gameplay/action
Nobody mentioned Ghostbusters yet?!?!
- Ast A. Moore
- Rick Dangerous
- Posts: 2643
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Beeper music during gameplay/action
That still takes up quite a lot of the CPU cycles (considering how many are needed to play the multichannel sound). The player and the animation must be decently optimized.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
- Einar Saukas
- Bugaboo
- Posts: 3196
- Joined: Wed Nov 15, 2017 2:48 pm
Re: Beeper music during gameplay/action
That's a weird game... I can imagine a conversation like this:Ast A. Moore wrote: ↑Wed Apr 28, 2021 10:18 pm Dark Fusion pulls off some pretty amazing stuff in the animated menu with multichannel beeper music.
AUTHOR: "We just finished developing our new shoot-em-up!"
PUBLISHER: "Sorry, we are only interested in platform games now."
AUTHOR: "Hold on..."
Re: Beeper music during gameplay/action
The Goonies!!!
Creator of ZX App: https://play.google.com/store/apps/deta ... boys.zxapp
Re: Beeper music during gameplay/action
I just wanted to add that about a year or two ago someone made a demo in 100% Sinclair Basic which featured Beeper music during the whole demo. It's a bit off-topic but I thought it was worth mentioning because it was impressive to see (and hear). Can't remember the name of the demo though.
- Ast A. Moore
- Rick Dangerous
- Posts: 2643
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Beeper music during gameplay/action
It is weird.Einar Saukas wrote: ↑Thu Apr 29, 2021 1:04 amThat's a weird game...Ast A. Moore wrote: ↑Wed Apr 28, 2021 10:18 pm Dark Fusion pulls off some pretty amazing stuff in the animated menu with multichannel beeper music.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Beeper music during gameplay/action
Moon Patrol from Atarisoft. A nice conversion with parallax scrolling and music during gameplay, but unfortunately slow.
Re: Beeper music during gameplay/action
IMHO the best 48k ingame music:
https://spectrumcomputing.co.uk/index.p ... 6&id=30378
[media]https://youtu.be/PqkqPZz39uA[/media]
https://spectrumcomputing.co.uk/index.p ... 6&id=30378
[media]https://youtu.be/PqkqPZz39uA[/media]
- Turtle_Quality
- Manic Miner
- Posts: 508
- Joined: Fri Dec 07, 2018 10:19 pm
Re: Beeper music during gameplay/action
The easiest way to make music with the beeper is to disable interrupts and have a timer loop before every click, like the rom routine. But that means nothing else is happening. Or you compromise by playing short beeps then some action happening. But the beeps can't be too short or they won't be recognisable beeps, just clicks. The shorter the beeps the less musical they are, the longer they are the less time for action, the slower the gameSparky wrote: ↑Wed Apr 28, 2021 2:46 pm I don't know why some of you think beeper music slows down games? They are loaded into memory using machine code, and made to repeat. Then, the game executes and plays. The effect of this is probably less than 5% of the overall speed.
P.S. I am talking about music, not sound effects.
Much, much more difficult is to try to weave your music, display and logic code so that the clicks arrive at the right time, the graphics aren't chopped by the raster and there's time to get everything done at an action speed. There's no way to tell the exact time apart from a frame counter which is too low res or the R register which is too hi res. By the way I'm going to make a feeble attempt at this in my game (for sound affects) and almost certainly fail
And once the 128K was on the market it was way easier just to put the in game music in the 128K version, let the AY chip do the work for you
Definition of loop : see loop
Re: Beeper music during gameplay/action
If you just load it on a high memory location, and have it repeat (all in machine language), without any special timings, it will barely make a difference.
Alex
Re: Beeper music during gameplay/action
It doesn't work like that. You can't just tell the CPU to run this bit on repeat. You have to do all the necessary scheduling yourself and, as mentioned by [mention]Turtle_Quality[/mention] , you don't have the luxury of ideal timers. You can call an interrupt routine once every 1/50th of a second (not often enough) or attempt to manually time it using the R register (difficult and rolls over too often). So pretty much every way of doing it is a bit nasty.
Re: Beeper music during gameplay/action
Machine language <> Magic.
To produce a middle A note (440Hz) you need to be toggling the speaker 440 times a second, with 50 frames a second, that requires 8 changes per 50 Hz frame.
Easy? Without any hardware timers or interrupts as already mentioned, no.
Re: Beeper music during gameplay/action
I dont know if it's a good idea but perhaps can be added "In-game music" as "Feature" in the search form.
Re: Beeper music during gameplay/action
Wouldn't the speaker need to be turned on then off for a complete cycle, meaning that you need to toggle the speaker 880 times a second for a middle A?
ZX Soft - ALIEN(BUGFIX) - GB Soft - Demoscene
Re: Beeper music during gameplay/action
Yes, I think you are spot on, you actually need 16 evenly timed OUTs to the beeper per frame, which is even further past "trivial in machine language in high memory".
Re: Beeper music during gameplay/action
Hi! We are compiling a definitive list here, so we can add a new group to the database.