Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - LackofTrack

Pages: [1] 2
General Jo Engine Help / Re: Faster Way to load an TGA image pack?
« on: September 08, 2020, 03:48:01 am »
I already use 8 Bit TGA so that wouldn't help. Is there any way to have a map use a tileset instead? I think that would solve the problem.

General Jo Engine Help / Faster Way to load an TGA image pack?
« on: September 05, 2020, 07:12:49 pm »

My map uses 48 tiles and I'm using jo_sprite_add_image_pack to load them, however the game takes about 15 secs to start when I use that function.
Is there any way to speed up the loading?

Have you made sure you're using the latest version of mednafen? Loop functionality works perfectly for me and I use mednafen.

Also, are your wav files 16 bits or 32 bits? 16 Bit files are supported on Saturn, but 32 Bit files are not. Just check to make sure. :)

Jo Engine Wish List / 8 Bit TGA Support?
« on: July 02, 2019, 07:37:10 am »
Could we get 8 Bit TGA support along with 8 Bit versions of functions like jo_sprite_add_image_pack and such?

8 Bit image support isn't as in depth as 16/24 Bit support is right now. It will help make it easier to conserve RAM and space on the iso itself.

I know Xl2's 4 Bit Image Converter exists and while it is a great tool, to be honest 16 colors is a little to limiting for me.

Thanks for reading!

Sorry for the thread resurrection but I've manage to make both the SBL PCM File System and Stream System work.
Ponut64, I think the reason why you could get the library to work (correct me if I'm wrong) is that you didn't do these three things.

1) Initiate the Sound Driver exactly how the PCM Samples SBL comes with do.  *See sndInit in the samples.
2) Use slIntFunction to perform PCM_vblIN at vblank.
3) Use jo engine callback to continuously poll PCM_Task. *Really Important because no sound will play if you don't do this, but no error will occur either.

See if you can get it to work now ;)

Also here are some Demos if you want to see the library in action.

File Demo:!RpgBBQKT!NJwHuYEoC7QkRxhawHUgmw93GK_KSVol-N1t0osJmvU
Stream Demo:!JoxXVCRY!utkldSnizwQ4z5-ZN9N_Z8sWxXwaWghUedo6oVRN-b0

Project announcement / Re: Sonic Z-Treme
« on: August 19, 2018, 09:31:20 am »
I'm using SBL for the audio.
You mean only the left or right speaker is outputting cd audio?

No I mean both channels are being "squished" into the center as if the audio was mono. Also If you are using SBL I think the correct command is:
Code: [Select]
SND_SetCdDaPan(-15, 15);

Project announcement / Re: Sonic Z-Treme
« on: August 19, 2018, 07:45:11 am »
Hey XL2, kind of a little late but, listening to your SAGE preview video I just realized that your CD audio is mono. I think it is because you have your slCDDAOn Command like this:
Code: [Select]
slCDDAOn(127, 127, 0, 0);
When it should look this:
Code: [Select]
slCDDAOn(127, 127, -127, 127);
Please correct me if I'm wrong though.

General Jo Engine Help / Re: Request for real hardware tests
« on: July 05, 2018, 09:11:17 am »
I tested the iso on my Japanese Model 2. On all the 3 test tries I did, at about 1 minute and 42 seconds in static began to appear in the song.
Also the song doesn't stop correctly and keeps repeating the last second of itself. A brief look at the code and it looks fine.
I wonder why the problem occurs only on real hardware.

Yeah. Rockin'B's sound player definitely proves that mixing the two libraries is possible, but when I looked through the source code I found the player only plays AIF and Adpcm that already have a header. I think for now you should see if you can get AIFs to play as that seems a lot easier to playback compared to XA audio, but that's for you to decide.  :)

After looking at your code I noticed a few things off about it. So I made some adjustments to it. Please review it.
Code: [Select]
#ifndef __AUDIO_H__
#define __AUDIO_H__

#define SECTOR_SIZE     (2324L)
#define RING_BUF_SIZE  (2324L*10)
#define PCM_ADDR  ((void*)0x25a20000)
#define PCM_SIZE  (4096L*4)

#define SMP_1TASK_SAMPLE (1024)
#define SMP_LOAD_NUM (10)

#define SND_RAM (94371840)
#define LW_RAM (2097152)

//Functions go here
void adpcm_load(void);


//this file is compiled separately
#include <jo/jo.h>
#include "audio.h"

//Apparently, this file is CD-ROM XA.
void adpcm_load(void){
/* Work  */
PcmWork  pcm_work;
PcmCreatePara para;
/* Ring Buffer  */
Uint32  ring_buf[RING_BUF_SIZE / sizeof(Uint32)];
// Handles
StmHn       stm;
PcmHn       pcm;
StmGrpHn stmfpcm;
StmKey key;
PcmInfo info;
Sint8* name = "SHELL.ADP";
Sint32 fid = GFS_NameToId(name);

//Data of read in process
Sint32 rdsize;

/* Set Interrupt Process */
// Use
 // INT_???
// and set V-Blank IN interrupt.
// Call
 // PCM_VblIn();
// within V-Blank IN interrupt.

/* File initialization */
stmfpcm = STM_OpenGrp();
STM_KEY_FN(&key) = STM_KEY_CN(&key) = STM_KEY_SMMSK(&key) =
STM_KEY_SMMSK(&key) = STM_KEY_SMVAL(&key) = 0x04;/* Audio Sector */
STM_KEY_CN(&key) = 0; /* channel No. */

/* Open Stream */
stm = STM_OpenFid(stmfpcm, fid, &key, STM_LOOP_NOREAD);

/* Create Handle */
PCM_PARA_WORK(&para) = &pcm_work;
PCM_PARA_RING_ADDR(&para) = ring_buf;
pcm = PCM_CreateStmHandle(&para, stm);
typedef struct  {
    //  Sint32 file_size;           how big is your file in bytes?
    //  Sint32 channel;             how many channels does your file have? '1' if mono '2' if stereo.
    //  Sint32 sampling_bit;        based on your comment I think this is 16.
    //  Sint32 sampling_rate;       in your case this is 18900.
    //  Sint32 sample_file;         I think this is asking for how many samples are in your file. In order to check this
    //                                         use a program like audacity.
    //  Sint32 compression_type;    I don't actually know what this is asking for and have no idea what to put here. 
}   PcmInfo;
PCM_SetVolume(pcm, 7);
PCM_SetInfo(pcm, &info);
PCM_SetLoadNum(pcm, SMP_LOAD_NUM);
PCM_SetTrModeCd(pcm, SMP_TR_MODE_CD);
PCM_Set1TaskSample(pcm, SMP_1TASK_SAMPLE);
/* Start Playback */
while(TRUE) {
rdsize = STM_GetNumCdbuf(stm);
jo_printf(0, 0, "(%i)", rdsize);
/* Playback task processing */
/* End condition */
if (PCM_GetPlayStatus(pcm) == PCM_STAT_PLAY_END) break;
/* Destroy Handle */
/* Close stream */
/* End Processing */


Also if ADPCM doesn't work out for you in the end I'd probably just try to play AIFF files(Seems a lot easier to play compared to ADPCM) or even CD-DA files if your project allows it.

I don't think the CD needs to be formatted as Mode 2 Form 2. I'm pretty sure this is only for Photo/Video CDs.
When you say commenting out one of the XA key lines makes the program work in SSF, does that mean it plays sound?

General Jo Engine Help / Re: CD-DA Audio in Jo is broken...?
« on: June 26, 2018, 12:10:47 am »
That's weird. Mednafen should work with Windows 7. Did you download it from the official site?
Also I recommend you use the Mednaffe GUI. It's what I personally use and it works great for me.

 :) That is the Sega XA ADPCM encoder I'm taking about. It outputs a XA audio file with no header. So you are using XA audio. Also CD-XA has nothing to do with the fact that you are using an iso.
CD-XA will work perfectly fine in a iso.(CD-XA is within the iso itself. CD-DA is not actually in the iso. You have to use a cue file in order to tell the iso to use your CD-DA files.)

Are you using the XA ADPCM audio encoder by Sega for Mac? If So then you need to use the function 'PCM_SetInfo'. The files the XA encoder outputs doesn't have a header
so you need to specify the audio information. Also I'm pretty sure you can only use Stream playback mode when using XA audio.

I thought the CPU overhead they were referring to was one of the SH2 processors.
It would be a relief if they were talking about the M68k processor, but if that's the case then what's stopping you from doing 44khz ADPCM? It is only has about 30% CPU overhead.(What else would the M68k processor be doing besides this?)

Pages: [1] 2
SMF spam blocked by CleanTalk