Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - [Question] ReRecording

Reply to topic
Author Message
  • Joined: 16 May 2002
  • Posts: 1211
  • Location: italy
Reply with quote
[Question] ReRecording
Post Posted: Sat Jan 23, 2021 10:02 am
How hard would it be to implement basic rerecording capabilities to Meka? I'm not talking about full blown TAS features, just the ability to record and replay an input log, I'm not an expert but it shouldn't be too hard if Meka is already deterministic enough?

I usually use Dega to prepare the videos I upload on my Youtube channel, but some games tend to malfunction in Dega (not to mention homebrew games which use psglib), so it would be nice to have an alternative.

Again, I'm not talking about anything fancy, just something which would allow to load a savestate and resume from there, to remove simple mistakes from playthroughs, it's a common practice.

Thanks in advance.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2856
Reply with quote
Post Posted: Sun Jan 24, 2021 2:11 pm
Tom wrote
some games tend to malfunction in Dega (not to mention homebrew games which use psglib)


Uh? Can you elaborate on this? Thanks!
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13544
  • Location: London
Reply with quote
Post Posted: Sun Jan 24, 2021 3:08 pm
Dega doesn’t handle single byte writes for frequency updates.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2856
Reply with quote
Post Posted: Sun Jan 24, 2021 3:43 pm
I see. Pretty bad bug, then.
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1211
  • Location: italy
Reply with quote
Post Posted: Sun Jan 24, 2021 5:23 pm
It was already mentioned here, by the way.

And I'm sorry if it sounded like I was blaming psglib for that, on the contrary, I thought I made it pretty clear that I'm looking for a better alternative to Dega because it's the emulator's fault, which is why I asked this question about rerecording, so I could switch to Meka for my youtube videos.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2856
Reply with quote
Post Posted: Sun Jan 24, 2021 6:11 pm
Tom wrote
It was already mentioned here, by the way.


Yeah, my terrible memory again. :|

Tom wrote
And I'm sorry if it sounded like I was blaming psglib for that


it never sounded like you were blaming PSGlib

edit - yes, Dega is expecting that any byte (for the PSG chip) that follows a 'set tone low bits' byte is one that's there to set the high bits, see first 'if' block.

void DpsgWrite(unsigned char d)
{
  MastSoundUpdate(); // Update sound up to here
  VgmPsg(d); // Write to disk
  if ((Dpsg.Last&0x90)==0x80)
  {
    // 1cc0pppp PPPPPPPPP : Set Channel Pitch
    int c=(Dpsg.Last>>5)&3;
    Dpsg.Period[c]&=0x00f; Dpsg.Period[c]|=d<<4; // Keep low bits and set high bits
    RecalcAdd(c);
  }

  if ((d&0x90)==0x80)
  {
    // 1cc0pppp
    int c=(d>>5)&3;
    Dpsg.Period[c]&=0xff0; Dpsg.Period[c]|=d&15;// Keep high bits and set low bits
    RecalcAdd(c);

    if (c==3) Noise=1; // Reset noise seed
  }

  if ((d&0x90)==0x90)
  {
    // 1cc1vvvv : Set Channel Volume
    int c; unsigned char v; c=(d>>5)&3; v=(unsigned char)((~d)&15);
    if (v>Dpsg.Volume[c]+2)
    { Chan[c].pSam=NULL; RecalcAdd(c); } // Louder: it's likely this is a new note
    Dpsg.Volume[c]=v;
    RecalcVol(c);
  }

  Dpsg.Last=d; // Store current byte (in case of a two byte command)
}


and this doesn't happen with PSGlib in case of small vibratos where the high bits don't change, so there's no need to rewrite them (also, it's not too hard to fix this, honestly...)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13544
  • Location: London
Reply with quote
Post Posted: Sun Jan 31, 2021 1:20 pm
To answer the original question: I guess it is not trivial (it’s harder than savestates, for example) and given the development rate of Meka, it’s unlikely to happen any time soon.
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1211
  • Location: italy
Reply with quote
Post Posted: Sun Jan 31, 2021 4:43 pm
I see, thanks for your reply :(

I hoped that since the piano works very well it would have been easy to install a piano roll on it, but since I know nothing about emulation I'm not surprised that I was wrong.

Time for plan B, I guess.
sverx wrote
it's not too hard to fix this, honestly...
Do you think you can do it? Not to vanilla Dega of course, but to its ReRecording version. We shouldn't talk about it in this topic, though, I don't want to pollute the Meka subforum with its competitors.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2856
Reply with quote
Post Posted: Sun Jan 31, 2021 11:27 pm
Tom wrote
Do you think you can do it? Not to vanilla Dega of course, but to its ReRecording version.


Where's that?
  View user's profile Send private message Visit poster's website
  • Joined: 16 May 2002
  • Posts: 1211
  • Location: italy
Reply with quote
Post Posted: Mon Feb 01, 2021 12:18 am
Right, I have no idea, I just looked for it, but even tasvideos only has a link to the compiled version. There is another link to what looks like a webspace of sorts, but it doesn't work anymore and it's not archived on the wayback machine.

Oh well, thanks anyway :(
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!