Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:53 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PICO PETSCII

     Page 14 of 38    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 02:04pm 13 Oct 2023
Copy link to clipboard 
Print this post

  Martin H. said  Ten years ago, I could have helped you with the carpentry, but now I'm too old (or not in physical condition)


Well, I'm 77 with wrecked shoulders. I know what to do, and have a couple of handy lads to help, but the weather has not been cooperating for outdoor work. It's very fiddly and non-standard work, but will be an improvement over the dog's breakfast that I got when I bought the house.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 04:19pm 13 Oct 2023
Copy link to clipboard 
Print this post

  Quote  I've been away on hols for the last week, I will have a look @ getting it all going again on LCD once I'm back, which will be next week. I would hope that eventually there will be a single source, which simply checks what it's running on & works.

Peter said:-
 Quote  
I could, if this is useful, allow FRAMEBUFFER BLIT to be used on the second processor.

Yes please :-) along with your other speed improvements, I think this would be a very useful feature.

Regards Kevin.
(from Croatia, where it's currently too hot(for us), were expecting 22C got 28C)!


Have a look at the new capabilities in RC8. Hopefully useful for the LCD version
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 09:39am 15 Oct 2023
Copy link to clipboard 
Print this post

This version is still made on picomite VGA version RC4/RC5.
Not tested on RC8 yet since it still uses the PET18 library.

This is where I am with health, and the USE key and some (not moving) robots.
Currently burried in the weapons and damage, but that is a major task.
Discovered that the grass tiles outside also can get damaged. So a gun shot won't travel far outside. I really have to re-engineer what they did (they add each gun shot, and bomb and emp etc.. to the unit attributes, and let the AI handle the processing)

Anyway, this is the status without WASD support for guns.


pet18i.zip


Volhout

P.S. Martin, the music and sfx combination does not work. Not sure if you had it working, but when I start the music, sfx is not audible.
Edited 2023-10-15 19:43 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 10:15am 15 Oct 2023
Copy link to clipboard 
Print this post

  Quote  Not tested on RC8 yet since it still uses the PET18 library.


Should be OK on RC8. I maintained the CSUB/END CSUB tokens on the VGA version but they changed on the normal version to be the same as VGA. The libraries should now be properly interchangeable between versions
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 10:36am 15 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  

P.S. Martin, the music and sfx combination does not work. Not sure if you had it working, but when I start the music, sfx is not audible.

With the MODuls, as they are right now, you can only chouse.. SOUND FX or Music,
PLAY Modsample just plays samples of the MOD File which is loaded. As the Music Files doesn't contain the SFX, they dont work, when a Music File is loaded.

So if you load a Music File, after loading, set the Parameters for the SFX to 20 (an empty Sampleslot)so they dont play a random Instrument Sample.
s_dsbarexp=20:s_dspistol=20:s_beep=20:s_beep2=20:s_cycle_item=20:s_cycle_weapon=20
s_door=20:s_emp=20:S_error=20:s_found_item=20:s_magnet2=20:s_medkit=20:s_move=20
s_plasma=20:s_shock=20:s_dsbarexp=20

Thats why I used a Variable for every SFX Sound
I'm currently in the process of finding a solution.
To do this, I have to accommodate all the SFX I need in the module and free up a channel (4) for them and have to be 120K long in total so that they fit into the MODBuffer.
I wrote about it, some Time ago.

As soon as I managed this, the Module will be exchanged and the SFX Parameters Fixed.
Im sitting and creating a Dummy Mod Loop for Level1, based on the BG Music from the SEGA Genesis, where I have no Modfile for.. but with your own samples you have much more control over their length and loop points.
There I will Add the SFX Samples.
Then we have some kind of background music to play with
---
But Now, I will go testing your new version and try to intigrate the Start Menu as far as I am with it.
@thwill .. I already added the Controlls for Game*Mite for the Menu.

Have @all A nice Sunday
Edited 2023-10-15 20:59 by Martin H.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 11:27am 15 Oct 2023
Copy link to clipboard 
Print this post

Martin

Apologies if you know this already.

I wasn't the one who developed modsamples but my understanding is that the idea is that you have the music and sound affects in the same mod file. Then play the mod file and the music will run on its loop. While it is running you should be able to then execute individual samples (sound effects) using play modsample.

I haven't tested this on the Pico but the code is a direct lift from the CMM2
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 11:52am 15 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  Martin

Apologies if you know this already.

I wasn't the one who developed modsamples but my understanding is that the idea is that you have the music and sound affects in the same mod file. Then play the mod file and the music will run on its loop. While it is running you should be able to then execute individual samples (sound effects) using play modsample.

I haven't tested this on the Pico but the code is a direct lift from the CMM2

You are right.. that makes this format so compact. The size of the file is not related to the length of the song, but to the size of the samples

thats what i try to get running, but the original MODs mostly use all 4 Chanels, so even if I get Music and SFX fit in same the Mod in 120k, the Music Loop will kill the SFX when playing on the same Channel. To avoid this,I try to get Chanel 4 free for SFX without destroying the songs too much.

Right now, i Work with FL Studio (my favorite toy when it comes to music) to find out which sound is played by which instrument in the SEGA version and create matching samples. Which I then convert to 8 bit mono 10250 Hz in Adobe Audition. I then use this Samples and the Melody in Protracker (which I last worked with 30 years ago) to create the MOD File.

If I get stuck there, I'll continue working on the start menu for the game..
(sometimes I think I'm a little hyperkinetic)

So a very relaxed Sunday
Edited 2023-10-15 21:58 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 12:04pm 15 Oct 2023
Copy link to clipboard 
Print this post

Robots move their default path (when in window).
Not in attack mode yet.

pet18j.zip

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 12:04pm 15 Oct 2023
Copy link to clipboard 
Print this post

Unless I misunderstand the codec you have 32 channels to play with
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 12:26pm 15 Oct 2023
Copy link to clipboard 
Print this post

Don't get me wrong, I don't want to complain about anything.
I'm doing it for fun.

  matherp said  Unless I misunderstand the codec you have 32 channels to play with


Sadly not, you might use 32 Sampes but,like on the Amiga, there are just 4 channels.
which is absolutely ok
  Quote  
> play modfile "sfx.mod
Playing sfx
> play Modsample 1,1
> play Modsample 1,4
> play Modsample 1,5
Error : 5 is invalid (valid is 1 to 4)
with

Like the original Amiga,
Later there were programs on the PC that changed the format up to 16 or 32 channels.
But the original works with 4 channels, same with the Play modsample.
No problems, just challenges
Edited 2023-10-15 22:35 by Martin H.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 12:35pm 15 Oct 2023
Copy link to clipboard 
Print this post

Try putting the music on channels above 4 - what happens?  I can probably change that test in modsample



Forom the codec header
#define NUMMAXCHANNELS 32
#define NUMMAXSEFFECTS 4
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 12:38pm 15 Oct 2023
Copy link to clipboard 
Print this post

this deserves further investigation.Maybe I'm thinking too complicated

Sadly this isnt an easy task, as one has to move evreything in,forexample,channel one  and copy it to channel 5.. track for track.

couldn't test it, with Protracker, as it is a clone of the original Amiga Software, I have to find other MOD Edit Software which is able to handle more than 4 Channels.

It would be much easier to allow channel 5 to play modsamples, as it is never used by the music used here, and ar no part of the Music so it isn't nessesary if I couldn't edit it in the Tracker Software, I just would have to add the SFX Samples so that they are part of the Mod  
Edited 2023-10-15 22:53 by Martin H.
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 01:07pm 15 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  
From the codec header
#define NUMMAXCHANNELS 32
#define NUMMAXSEFFECTS 4


you made my day  
the Payer seems to play the music while I play up to 3 Samples on ch 1-4 without interrupting the Music,(if I try 4 it doesn't play any Sample) so it might internaly use other Channels for the Music  than forthe Modsamples
Now I just have to make sure that I get all the samples fit in 120 kb.
Edited 2023-10-15 23:13 by Martin H.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 01:31pm 15 Oct 2023
Copy link to clipboard 
Print this post

Martin

The modsample code was written by Andrew West and I attach his demo for you to run/review

modeffects.zip

Ignore the samplerate in the menu - CMM2 specific

I've also increased the number of effects from 4 to 32 in the attached but can't test this.

PicoMiteVGA.zip

Andrew isn't on TBS but if you want to contact him I have his email address and I can PM it to you

Remember, you can set the modbuffer size > 128 if you want

OPTION MODBUFF ENABLE n (n defaults to 128)
Edited 2023-10-15 23:32 by matherp
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 01:41pm 15 Oct 2023
Copy link to clipboard 
Print this post

@Volhout
try this please, here I added the SFX and shortened it so that the MOd just fits into the modbuffer

sfc_metallicbop.Zip
Set the Variables as follows:

s_dsbarexp=16:s_dspistol=17:s_beep=18:s_beep2=19:s_cycle_item=20:s_cycle_weapon=21
s_door=22:s_emp=23:S_error=24:s_found_item=25:s_magnet2=26:s_medkit=27:s_move=28
s_plasma=29:s_shock=30:s_dsbarexp=31

then we have SFX & Music  
'no comment
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 01:48pm 15 Oct 2023
Copy link to clipboard 
Print this post

  matherp said  Martin

The modsample code was written by Andrew West and I attach his demo for you to run/review

modeffects.zip

Ignore the samplerate in the menu - CMM2 specific

I've also increased the number of effects from 4 to 32 in the attached but can't test this.

PicoMiteVGA.zip

Andrew isn't on TBS but if you want to contact him I have his email address and I can PM it to you

Remember, you can set the modbuffer size > 128 if you want

OPTION MODBUFF ENABLE n (n defaults to 128)


Thank you Peter, as I wrote in the Post abov yours, ..the Payer seems to play the music while I play up to 3 Samples on ch 1-4 without interrupting the Music.

so, we haveChannels for Playing 3 SFX at the same Time, while the the Music is playing.
No extra   change in the Picomite Firmware needed.
'no comment
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 01:48pm 15 Oct 2023
Copy link to clipboard 
Print this post

Remember unless you want multiple SFX at the same time they can all be played on the same channel.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 02:04pm 15 Oct 2023
Copy link to clipboard 
Print this post

Now have lunch first and then continue to look at the menu


No, I don't have the game running on the GAME*MITE yet, I'm currently just using it for the intro to make sure the controls are supported

---EDIT---

@Volhout
Just tested 18j on the Pico-VGA
It is getting better with every Update
Sum issues here and there but you can see where it's going.
I hope I'll get a version with intro ready tomorrow.
It's moving towards the beta version
Edited 2023-10-16 02:24 by Martin H.
'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 08:40pm 15 Oct 2023
Copy link to clipboard 
Print this post

Martin,

Implemented your changes for the sound. That seems to work great.
Only (to my ears) the sfcmetallicbop.mod music is not as good quality as the metal_heads.mod.
This was originally (metallic_bop_amiga.mod) already the case, so I guess there is nothing you can do about it.

Regards,

Volhout

P.S. pet18j also works with the latest PicoMiteVGA.uf2 RC8 when you load pet18i.bas new from filesystem. The library in the pet18.zip (the CSUB's) is still token compliant with RC8. If Peter is correct we do not need to change it when 50708 final release is done.
Edited 2023-10-16 06:52 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1114
Posted: 04:55am 16 Oct 2023
Copy link to clipboard 
Print this post

  Volhout said  Martin,

Implemented your changes for the sound. That seems to work great.
Only (to my ears) the sfcmetallicbop.mod music is not as good quality as the metal_heads.mod.
This was originally (metallic_bop_amiga.mod) already the case, so I guess there is nothing you can do about it.

Regards,

Volhout

Unfortunately, this is system-related. The size of a mod file depends almost entirely on the size of the samples used. I created sfcmetallicbop.mod  yesterday in a hurry and was intended as a validation of the concept.
The SFX Samples increase the size of the MODs by an additional 80K. The challenge is that the whole MOD fits on a normal Pico, not just Clones with more Flash Size.

In order for everything to fit into the unchanged mod buffer, some samples had to be shortened. This also has to shorten the length of the loops, which can then be heard more clearly. On possibility is to lower the Samplerate of the SFX even more (Mod Samplerate can be from 9600 to 16000 Hz).
Because it is hardly possible to find a 100% suitable loop point with the complex sounds used, I have already considered replacing some of the samples with simpler waveforms. (I think a rectangle with alternating pulse width, like used on the C64). If I have that calculated, I can set a 100% fitting loop point and the sample for Lead and Synth bass could get by with a few 100 bytes and would sound more like in the C64 Version.
---

These are all just ideas that I'm playing with this week, but till the program is finished I will have found a usable solution

Have a nice Week..
Mart!n
Edited 2023-10-16 16:15 by Martin H.
'no comment
 
     Page 14 of 38    
Print this page
© JAQ Software 2024