dMZX Forums: MOD SAM does not work -> Archived MegaZeux Bugs -> Tracker

Jump to content

Report ID 454 Title MOD SAM does not work
Product Archived MegaZeux Bugs Status Fixed (Severity 3 - Medium)
Version 2.84 Fixed in 2.92
Introduced In Version 2.80XOperating System All Platforms

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #454: MOD SAM does not work

#1 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 25 May 2012 - 03:20 PM

// FIXME - There may be no way to get this to work.
// It may have to be removed.


Heh. Heh. Heh. Heh. :(
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 13)

#2 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 27 May 2012 - 06:59 PM

Updating status to: Flagged For Future Version

If we're going to do ANYTHING about this (we haven't looked all that hard at it), we aren't going to do anything about it for 2.84 regardless.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111

#3 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 27 May 2012 - 07:46 PM

Updating version to: 2.84


I'm going to root out this stupid fucking tracker bug if it's the last thing I do.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#4 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 27 May 2012 - 07:57 PM

nnnngghghh
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#5 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 27 May 2012 - 07:58 PM

Updating version to: 2.84

KILL YOU
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#6 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 31 May 2012 - 05:07 PM

Back on topic: who uses MOD SAM anyway? I wonder if we could compile a list of games that actually used it somewhere along the line... in BBH's thread two games alone were mentioned.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#7 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 26 May 2017 - 01:39 AM

Updating status to: Confirmed

Woa 2.85 is gonna fix a lot of bugz :tounge:/>
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#8 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 12 June 2017 - 05:51 PM

Updating status to: Flagged For Future Version

But not this one, it seems, as this relies on us switching to xmp, and xmp doesn't support row getting/seeking.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#9 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 06 September 2017 - 06:13 AM

Updating status to: Closed - No Change

I've added support for MOD SAM in libxmp in the branch add-mod-sam.

The behavior libxmp exhibits will use instruments instead of samples in modules with instruments (undefined behavior in DOS, because MODs and GDMs did not), and will loop samples/instruments if they have looping enabled in the module (inconsistent with DOS; in the version of Stuffyou City with MOD SAM, the pacman power pellet sound effect will repeat indefinitely with libxmp).

Only two games ever used MOD SAM, one of which (Stuffyou City) has been updated in the vault to not use it. We can't support all sound engines with this, and there's no guarantee that it will behave the same between the engines that do support it. And finally, we could use that command index for something more deserving in debytecode.

It's highly unlikely this will make it into a release of MegaZeux.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#10 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 17 September 2018 - 04:58 AM

Moving to: Archived MegaZeux Bugs

#11 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 03 October 2018 - 08:16 PM

I'm deleting this branch, so here's all relevant code that was added in that branch for reference:

audio/audio.c
void spot_sample(int freq, int sample)
{
  if(audio.primary_stream && audio.primary_stream->spot_sample)
  {
    LOCK();
    audio.primary_stream->spot_sample(audio.primary_stream,
     (freq_conversion / freq) / 2, (unsigned int)sample);
    UNLOCK();
  }
}


audio/audio_xmp.c
static void audio_xmp_spot_sample(struct audio_stream *a_src,
 Uint32 frequency, Uint32 sample)
{
  // Convert frequency to nearest chromatic note
  int note = (int)(12.0 * log(frequency / 523.3) / log(2) + .5);

  xmp_smix_play_instrument(((struct xmp_stream *)a_src)->ctx,
   (int)sample, note, 64, 0);
}


(in the xmp destruct function before xmp_end_player)
  xmp_end_smix(((struct xmp_stream *)a_src)->ctx);


(in the xmp init function after xmp_set_player)
    xmp_start_smix(ctx, 1, 0);

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#12 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 06 July 2019 - 04:53 AM

Moving to: MegaZeux Bugs

#13 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,895
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 06 July 2019 - 04:55 AM

Updating status to: Fixed
Issue fixed in: 2.92

Wow, this issue is a roller coaster ride. MOD SAM has been reimplemented in GIT 138b37c8 for libxmp builds. It's not perfect (currently samples won't e.g. fade out with the playing mod) but it's better than the SMIX implementation I posted before and seems to do good enough for Crisis in Stuffyou City and Sprite Catcher (haven't tested Talon's Tale much yet).
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#14 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 23 July 2019 - 12:36 AM

Moving to: Archived MegaZeux Bugs

This command has been fixed for games that implemented it in the past. It will not be supported for any world made past 2.70.


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

0 User(s) are reading this issue
0 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2026  IPS, Inc.