ASM : Lambda speaker.

Software and Games for the Lambda 8300 / Power 3000 Computer
Post Reply
bushy555
Posts: 3
Joined: Tue May 07, 2024 12:51 am

ASM : Lambda speaker.

Post by bushy555 »

Hi All,
Background:
For the past ten plus years I have been fascinated with the 1-bit music engines, mostly surrounding the work of Speccy Z80 guru's Utz and Shiru.
Between them, and a few others, there are somewhere around the 70 to 80 different 1-bit 'engines' or music players, with somewhere towards the 150 unique 1-bit tunes. I've ported a lot of these to a few other Z80 8-bits, including the Laser210/VZ200, Australian Microbee, Jupiter Ace, Aquarius and Camputers Lynx. Anything with a physical speaker and the ability to send a bit to the speaker via the OUT opcode or via a latch at a specific memory address. ...so that the tunes can actually be properly emulated. Am not real keen on hardware additions, such as what would be required for a real ZX81, such as a LPT1 DAC, or even playing through plugged in amplified speakers into the cassette port. Since Emulators cant really emulate this stuff.

Anyhoo, The Lambda is next on the list. Tossed up between emulators MESS, No$ZX and EightyOne, and EightyOne won.
Googling away to find Lambda speaker port info, and found DavidG's and MrtinB's other thread/post around the .TAP asm template from a few years ago. Thought I'd join the forum to post up this ... post. Also found another site whereby it mentions to activate the speaker is through the use of reading port F5 to make the speaker click.
Is this correct? A simple: IN A, ($F5) ???
I've played around with the two asm .TAP templates found in one of the other threads (move dot and the other) with one of the very simple 700 byte 1-bit music engines, assembled fine to a .TAP file (SJASMPLUS), though, something has still gone askew somewhere.
Fiddled a tiny bit plonking the source into No$ZX, assembled cleanly, but unfortunately I cant quite get my head around it, how to assemble out to an executable .TAP binary file, and when sending it to the emulator, she just froze.

If I were to throw up a cleaned up copy of my source, anyone interested in looking to see where I seemed to have failed?
Once I get one working, the other music engines should all just follow suite and also assemble and execute / play correctly, albeit with a bit of speed adjustment.

As a quick example : Song "Lets Go" by Shiru running in these emulators :
- 'Jynx', a Lynx computer emulator : https://youtu.be/pSUBceBQsHQ
- 3 Mhz Microbee computer in MESS : https://www.youtube.com/watch?v=Jil6W1oLxzo

I'd love to eventually see a bunch (50 odd?) of these music players sitting there all working for the Lambda.

cheers
dave
bushy555
Posts: 3
Joined: Tue May 07, 2024 12:51 am

Re: ASM : Lambda speaker.

Post by bushy555 »

...all good.
in al, ($f5) certainly works.
Just been fiddling and am nearly getting something to work. Issue is that because the reading of the port , the whole concept of writing out a value needs to be changed around so that the value being written out now needs to loop that many times to read the port.
Should have something working when I find more time to put into this.
User avatar
mrtinb
Posts: 1936
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ASM : Lambda speaker.

Post by mrtinb »

Hi.

As you probably already found out, this URL has the best source for the Lambda 8300.

problemkaputt.de/zxdocs.htm#lambda8300

There also exists a Lambda 8300 ROM disassemble scanned book in German. This however I cannot find at the moment.

The info about TAP format sounds wrong. The Lambda 8300 follows the format of the ZX81 which is .P

The format for Lambda is a little different where D-file, Vars and Program have been swapped.

An easier trick is that the Lambda ROM understands the ZX81 file format and swaps memory locations around when loading. This might help generating a file as more assemblers know the ZX81 format than the Lambda 8300 format.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
mrtinb
Posts: 1936
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ASM : Lambda speaker.

Post by mrtinb »

Also know that the Lambda 8300 came in two different ROM versions. The first version was almost a pure ripoff of the ZX81, and the company got sued. Then they released a new ROM where a lot of routines were moved to other locations and they added support for color if you bought an extra Lambda Colour Pack cartridge.

The JavaScript emulator for ZX81 also supports the Lambda 8300 with both versions of the ROM.

https://www.weggetjes.nl/jszeddy/jszeddy.html
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
bushy555
Posts: 3
Joined: Tue May 07, 2024 12:51 am

Re: ASM : Lambda speaker.

Post by bushy555 »

Thanks Martin for your reply & info. Yeps, correct - that Lambda website is where I found the port info.
And with a bit of further playing around with the NO$ZX emulator & assembler, and I'm now all over it. Its pretty cool & very easy to use once you get the hang of it.
User avatar
kmurta
Posts: 306
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: ASM : Lambda speaker.

Post by kmurta »

bushy555 wrote: Tue May 07, 2024 8:34 am Am not real keen on hardware additions, such as what would be required for a real ZX81, such as a LPT1 DAC, or even playing through plugged in amplified speakers into the cassette port. Since Emulators cant really emulate this stuff.
Believe me, ZX81 emulators can emulate the sound generated through the cassette port, see this: viewtopic.php?f=11&t=4622
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
Post Reply