News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
L

LambdaDrum progress & first demo

Started by LambdaMikel, 19:51, 17 February 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Who thinks that SND pin on expansion port is for sound input?

It's for mono sound output only
3 (75%)
It's for mono sound input only
0 (0%)
It's for mono sound input and output
1 (25%)

Total Members Voted: 4

TotO

You can find it for around 1$ on eBay... I have bought close to hundred of them.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

LambdaMikel

#51
Quote from: TotO on 19:12, 08 April 19
You can find it for around 1$ on eBay... I have bought close to hundred of them.


Wow! How cheap can you get... that's a great price!!  :D
Thanks for sharing!
I must say at that price I feel bad for the environment... no way that thing is 1 $ in production cost. Consider all the resources that were spent making that thing. That is great... and terrible at the same time. Like seeing one of these 1 $ calculators at Walmart with solar cells. Makes my heart bleed. The environmental costs are way higher than 1 $... But anyhow.


Do they work well with legacy hardware? Any devices where they wouldn't work?

TotO

I think they have built more than 10000 of them and the production cost is more close to 10cts.

Wrote into the MAX232CSE datasheet:

Supply Voltage (VCC) ...............................................-0.3V to +6V
V+ (Note 1) ..................................................(VCC - 0.3V) to +14V
V- (Note 1) .............................................................+0.3V to +14V

Input Voltages
TIN..............................................................-0.3V to (VCC - 0.3V)
RIN (Except MAX220) ........................................................±30V
RIN (MAX220).....................................................................±25V
TOUT (Except MAX220) (Note 2) .......................................±15V
TOUT (MAX220) ...............................................................±13.2V

Output Voltages
TOUT...................................................................................±15V
ROUT .........................................................-0.3V to (VCC + 0.3V)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TotO

About your Amazon links. Those guys buy them for 1$ in China to resell them 10 times the price.
May be some of them order in China and ship to the buyer address and never seen the items.  :laugh:

Sometime, it is useless to build an expansion module if it already exist with a price that we can not compete, because a giant industrial production versus you.  ;D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

LambdaMikel

Quote from: TotO on 19:41, 08 April 19
About your Amazon links. Those guys buy them for 1$ in China to resell them 10 times the price.
May be some of them order in China and ship to the buyer address and never seen the items.  :laugh:

Sometime, it is useless to build an expansion module if it already exist with a price that we can not compete, because a giant industrial production versus you.  ;D


Agree with all of that. Still, the real environmental costs of these items is much higher unfortunately. 


Still, would be nice to have a real DB9 on board of a CPC serial interface.


And, not everything we do must be a cheap as possible... the CPC is a hobby, and it is ok to spend some extra money for a thing you love.


Now I ordered also 5 of these 1 $ adapters  :D

TotO

Sure. When you embed it into a part of a full design, the price it is not a real problem compared o the functionnalities.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

GUNHED

Amazing! Guys take your time to make the final product really awesome!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Bryce

Quote from: TotO on 19:12, 08 April 19
You can find it for around 1$ on eBay... I have bought close to hundred of them.

I have a handful of these lying around somewhere too. They are really handy for quickly slapping together a custom debugger or programmer in just a few minutes.

Bryce.

LambdaMikel

#58
Next "milestone" passed - the serial interface is working in both directions, and I have "control command API". So you put LS 3 into Serial Mode using out &fbee,&f1, and then it runs a "serial mode" listener loop which allows you to talk to the USART, RX received USART bytes get buffered using interupts and


ISR(USART0_RX_vect)


and the received bytes can retrieved from the buffer using a "read cursor" which can be positioned, moved forward and backward through the buffer, etc. Below screenshots show a terminal program in BASIC.

Usingthe Emic 2 as test USART at 9600 bauds / 8N1, I can make it speak and also retrieve results from query commands, such as "I" and "C" (user for retrieving "Information" and "Settings" of the Emic 2 over USART).

I can post a video later.

Next - try to connect to the MP3 module and, the PC, and Amstrad NC100 using the FTDI cables and RS232 level shifters with DB9 socket.


GUNHED

Oh, that's amazing!!!  :) :) :)


Do you already know specifications like:
- baudrate
- number of stop bits
- Parity?
- bits / transferred unit (5,6,7,8?)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

LambdaMikel

#60
Quote from: GUNHED on 16:48, 11 April 19
Oh, that's amazing!!!  :) :) :)


Do you already know specifications like:
- baudrate
- number of stop bits
- Parity?
- bits / transferred unit (5,6,7,8?)
So far, I have only "talked" to the Emic 2 USART - 9600 / 8 N 1.
But there should be no problem with the following ATmega USART hardware
settings, I just haven't tried them yet - you can specify all these via serial command bytes.

void usart_on0(uint8_t rate, uint8_t width, uint8_t parity, uint8_t stop_bits) {

  SERIAL_BAUDRATE = rate;
  SERIAL_WIDTH = width;
  SERIAL_PARITY = parity;
  SERIAL_STOP_BITS = stop_bits;

  UBRR0H = 0;   
  switch (rate) {
  case 0 : UBRR0H = ( 520 >> & 0xFF; UBRR0L = 520 & 0xFF; SERIAL_RATE = 2400; break; // 2400
  case 1 : UBRR0H = ( 259 >> & 0xFF; UBRR0L = 259 & 0xFF; SERIAL_RATE = 4800; break; // 4800
  case 2 : UBRR0L = 129; SERIAL_RATE = 9600; break; // 9600
  case 3 : UBRR0L = 86; SERIAL_RATE = 14400; break;  // 14400
  case 4 : UBRR0L = 64; SERIAL_RATE = 19200; break;  // 19200
  case 5 : UBRR0L = 42; SERIAL_RATE = 28800; break;  // 28800
  case 6 : UBRR0L = 32; SERIAL_RATE = 38400; break;  // 38400
  case 7 : UBRR0L = 21; SERIAL_RATE = 57600; break;  // 57600
  case 8 : UBRR0L = 15; SERIAL_RATE = 76800; break;  // 76800
  case 9 : UBRR0L = 10; SERIAL_RATE = 115200; break;  // 115200
  case 10 : UBRR0L = 4; SERIAL_RATE = 250000; break;  // 250000

  default :  UBRR0L = 129; SERIAL_RATE = 9600; // 9600
  }

  UCSR0C = 0;

  switch (parity) {
  case 0 :                                         break; // no parity
  case 1 : UCSR0C |= (1 << UPM01) | (1 << UPM00) ; break; // odd parity
  case 2 : UCSR0C |= (1 << UPM01)                ; break; // even parity
  default : break;
  }

  switch (stop_bits) {
  case 2 :                         break; // 1 stop bit
  case 1 : UCSR0C |= (1 << USBS0); break; // 2 stop bit
  default : break;
  }


  switch (width) {
  case 8 : UCSR0C |= (1 << UCSZ00) | (1 << UCSZ01); break; // 8bit
  case 7 : UCSR0C |=                 (1 << UCSZ01); break; // 7bit
  case 6 : UCSR0C |= (1 << UCSZ00)                ; break; // 6bit
  case 5 :                                          break; // 5bit

  default : UCSR0C |= (1 << UCSZ00) | (1 << UCSZ01);       // 8bit 

  }

  UCSR0B = (1 << TXEN0) | (1 << RXEN0) | (1 << RXCIE0); 

}



Will try 115 k and 250 k bauds soon  :)
Btw, I am quite hopeful for strong and decent signal quality, since the ATmega RX0 TX0 USART outputs are passed through the CPLD, which will result in some signal amplification. So, even with long serial cables, I expect little noise on the lines.


GUNHED

Thanks! That already helps to prepare future software.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

LambdaMikel

Quote from: GUNHED on 17:12, 11 April 19
future software.  :)


future software from TFM is always a thing of the future!  :D


GUNHED

Quote from: LambdaMikel on 18:40, 11 April 19

future software from TFM is always a thing of the future!  :D


Hopefully it doesn't stay there.  ;) :) :laugh:
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

LambdaMikel

...nah... TFM brings you the FUTURE TODAY!

LambdaMikel

Quote from: zhulien on 07:42, 04 April 19
you mentioned the LS had a serial port in the other thread, perhaps one of these can plug into it so you can play mp3s?

They really are cheap (about AU$4 each) and very available on ebay.  I just can't find documentation anywhere as to what commands to send them.  It would allow games to play mp3's via the serial port (play a track, pause, continue etc) - without any CPC CPU time... meaning we can have game packs. 


https://www.ebay.com.au/itm/1X-YX5300-UART-Control-Serial-MP3-Music-Player-Module-for-Arduino-AVR-ARM-P-E7R0/253972842282?epid=9009226204&hash=item3b21f6072a:g:iWwAAOSwcWJb5pPT


I just searched serial mp3 player and found this... i wonder if they are all the same.  last time i was searching for model numbers etc, and all i got was ebay sellers.


http://geekmatic.in.ua/pdf/Catalex_MP3_board.pdf
Here you go - it works well for 4 $, no complaints  :D

http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/cpc-4-$-mp3-player-over-usart/


zhulien

So now just need a cpuple of rsx for basic programmers. Playtrack. Fade in track. Fade out track. Pause track. Restsrt track.


No need for skip or back as play does that if you track the track you are playing.

LambdaMikel

Quote from: zhulien on 09:52, 12 April 19
So now just need a cpuple of rsx for basic programmers. Playtrack. Fade in track. Fade out track. Pause track. Restsrt track.


No need for skip or back as play does that if you track the track you are playing.
Right, even though these are quite specific... It is not difficult to control the module. You need to send 6 cryptic bytes over serial, and there are a dozen commands or so.

However, it might be better to create an RSX extension which is more generic and would work for all kinds of serial equipment, for example, it might allow you to define "macros" for commands. So , rather than having an RSX |mp3play  command that is specific to this module, I would suggest to have a more generic set of RSX serial commands, for example, |serialmacrodef, "mp3play", "ff 7e 06 .... " (all the control bytes required for play) and then |serialmacrosend,"mp3play" or similar.


zhulien

Quote from: LambdaMikel on 15:31, 12 April 19
Right, even though these are quite specific... It is not difficult to control the module. You need to send 6 cryptic bytes over serial, and there are a dozen commands or so.

However, it might be better to create an RSX extension which is more generic and would work for all kinds of serial equipment, for example, it might allow you to define "macros" for commands. So , rather than having an RSX |mp3play  command that is specific to this module, I would suggest to have a more generic set of RSX serial commands, for example, |serialmacrodef, "mp3play", "ff 7e 06 .... " (all the control bytes required for play) and then |serialmacrosend,"mp3play" or similar.


I agree on that one.  Basically from an mp3 point of view, it is like a midi patch for samples, but rather a song patch for games.  but not really limited to that.  I hope some of the game developers start using it.  Not only on the lambda speak, but also on the minibooster and the other cheaper dedicated serial boards.  Have music options, None, AY-3-8912, PlayCity (if possible), SerialMP3 Lambda, SerialMP3 MiniBooster etc.  99% the same code for all the serial boards so not really an excuse.  The current games on SD Card (physical releases), they do use the SD Card for additional material, but why not add music usable in here too - like Pier Solar does on the Mega CD + Cart.

zhulien


zhulien

Could you imagine playing a patched Turrican with the Amiga music?

TotO

Quote from: zhulien on 15:46, 12 April 19
Pier Solar using the included CD Audio CD -
https://www.youtube.com/watch?v=EhrC1iJg1TU
Go to the credits, you will see my name. :-\

Sure, using MP3 you can have Pinball Dreams musics on CPC too...
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

LambdaMikel

#72
@TotO in the other thread you said MiniBooster had SPI external interface.
Now was it SPI or is it USART?


A big burden towards using SPI is an external API... nobody wants to flash  / program the ATmega with a driver in order to use a SPI or USART device. So the API and intelligent firmware is the key to such "multi function" devices IMHO. That's why I spend a lot of time programming the firmware and testing with different devices and making it usable from BASIC, such that using the device is as simple as possible. I also have the paradigm that it should be possible without MC. LambdaSpeak firmware is quite a bit of code by now. The ATmega is basically full... I am at 63 KBs of flash ROM. MiniBooster had plenty of empty space in the ATmega and people were suppose to program it, but nobody did it seems.


Sorry for questions, don't know anything about MiniBooster.

TotO

#73
Quote from: LambdaMikel on 19:19, 12 April 19
@TotO in the other thread you said MiniBooster had SPI external interface.
Now was it SPI or is it USART?
The MiniBooster can handle four slave SPI devices from its expansion connector.

16- SCK
14- SO
12- SI
10- SS0
08- SS1
06- SS2
04- SS3
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

LambdaMikel

Interesting.
Did it provide any high level API for sending SPI messages from the CPC, or did it require you to program and flash the ATmega in order to use some SPI device.

Powered by SMFPacks Menu Editor Mod