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 - CHASMS v.0.10 *alpha* release

Reply to topic
Author Message
vecna
  • Guest
Reply with quote
CHASMS v.0.10 *alpha* release
Post Posted: Wed Apr 12, 2000 2:15 am
Well, I've finally gotten this thing cleaned up for an alpha release. I'm only releasing this right now to some of my online friends, my family, and here to S8-Dev, to try to get some preliminary testing and feedback. I'm fairly pleased with it. ^_^

Some notes:
* Right now, it's totally unoptimized, and due to it running in hicolor and what not, my understanding is that it needs around a 300mhz machine to get full speed. Frameskipping is supported (tho only through the config right now) for slower machines - I do plan to optimize, but not until the rest of it is in good working order.
* It's windows-native, obviously, and requires DirectX um.. 5 or 6, I can't remember.
* The Settings menu is not fully implemented. (well, everything is tentative, but some of the functions listed on there don't work yet) Everything that's on the settings menu can however be changed through the chasms.cfg file.
* The savestate and movie file formats are *subject to change*. They have format version specifiers in them, but I'm not likely to support the uncompressed versions of them once I get some compression working. So, don't spend hours on a savestate or movie file. ^_~
* I've included hangon.smm, an example movie file. Load up Hang-On and run it -- Hang On is my bitch, and with movies I can prove it. ;) The current maximum length of a movie file is .. almost two and a half hours. Recording a movie longer than that is sort of pointless since no one would want to watch it. ^_^

I'm calling this an alpha not because it's unstable, but just because it's unfinished. It is, as far as I can tell, quite stable (although if it crashes on you, please let me know, and what you did!), but I just want to get some initial input and feedback at this point, to help me get it ready for an initial "public" release.

If you have any inklings on whats causing some of the SMS emulation bugs (Astro Warrior/Golvlius gfx corruption, RType level 3 problem, Altered Beast has ... stopped working! It worked when I did my 7 hour ROM testing marathon...), feel free to clue me in. ;) Also GG emulation is a bit poor, but I've only spent 10 minutes or so to get it to work in a basic way, and haven't implemented the ports 1 through 5 (did implement port 0 tho), so I'll do that before I start fretting the games that aren't working correctly.

Any other input / comments is greatly appreciated! And thanks again to all of that have answered my questions.

You can get it here CHASMS v.0.10 alpha

-vecna
 
Consolemu
  • Guest
Reply with quote
Finally! Yes!!!
Post Posted: Wed Apr 12, 2000 2:45 am
Finally, a SMS emulator for Windows. Vecna, you've just made emulation history. You're the first person to have ever written an emulator for Windows 32-Bit. Master Gear was first but it was only 16 bit, slow, midi sound, and bad coloring. I've only fiddled with it for 2 seconds and I like. My sidewinder works, the sound is nice and loud, and 5 games work so far. Good job! This is definately worth releasing. I'm very pleased with what you've done. Thanks! Keep up the good work!

Chris :o)
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: Finally! Yes!!!
Post Posted: Wed Apr 12, 2000 5:28 am
Quote
> Finally, a SMS emulator for Windows. Vecna, you've just made emulation history. You're the first person to have ever written an emulator for Windows 32-Bit. Master Gear was first but it was only 16 bit, slow, midi sound, and bad coloring.

No MasterGear for Windows was a win32 application... but it was buggy, underfeatured, and cost $35... ah, time marches on.
I think the bad coloring was actually intentional, only present in unregistered (crippled) versions.

Quote
> I've only fiddled with it for 2 seconds and I like. My sidewinder works, the sound is nice and loud, and 5 games work so far. Good job! This is definately worth releasing. I'm very pleased with what you've done. Thanks! Keep up the good work!

Garsh, when I get to my gf's apt. I'll try it out on the 600mhz machine, as the one I've got here is a bit underpowered. And I've got a sidewinder there too, whoo hoo!

Damn, I had heard once what it was that causes the gfx corruption in Astro Warrior, but I can't remember... If you go searching for some old version histories for MasterGear or Massage, you might find an explaination, I think Marat or ol' whatsisname actually explained what it was (an unusual but valid way of addressing video ram).

Or, ask Zoop or Ricardo. Sheesh, yeah, I suppose they -might- just know.
  View user's profile Send private message Visit poster's website
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Re: Finally! Yes!!!
Post Posted: Wed Apr 12, 2000 9:37 am
Quote
> Finally, a SMS emulator for Windows. Vecna, you've just made emulation history. You're the first person to have ever written an emulator for Windows 32-Bit. Master Gear was first but it was only 16 bit, slow, midi sound, and bad coloring. I've only fiddled with it for 2 seconds and I like. My sidewinder works, the sound is nice and loud, and 5 games work so far. Good job! This is definately worth releasing. I'm very pleased with what you've done. Thanks! Keep up the good work!

If I can comment about that, for maybe the fourth time this week, Maechiko's emulator did it since almost one year :)
I'll try CHASM tonight!
  View user's profile Send private message Visit poster's website
Nyef
  • Guest
Reply with quote
Re: Finally! Yes!!!
Post Posted: Wed Apr 12, 2000 12:55 pm
Quote
> Finally, a SMS emulator for Windows. Vecna, you've just made emulation history. You're the first person to have ever written an emulator for Windows 32-Bit. Master Gear was first but it was only 16 bit, slow, midi sound, and bad coloring. I've only fiddled with it for 2 seconds and I like. My sidewinder works, the sound is nice and loud, and 5 games work so far. Good job! This is definately worth releasing. I'm very pleased with what you've done. Thanks! Keep up the good work!

First Win32 SMS emulator? No, even DarcNES is available for Win32 now (win32 port hosted by overclocked). And, despite the name, it does emulate the SMS.

Quote
> Chris :o)

--Nyef
 
vecna
  • Guest
Reply with quote
bah.. ;)
Post Posted: Wed Apr 12, 2000 1:40 pm
Quote
> If I can comment about that, for maybe the fourth time this week, Maechiko's emulator did it since almost one year :)

An emulator that isn't free is no emulator at all. ^_~

- vecna
 
Ricardo Bittencourt
  • Guest
Reply with quote
Re: Finally! Yes!!!
Post Posted: Wed Apr 12, 2000 2:25 pm

Quote
> Damn, I had heard once what it was that causes the gfx corruption in Astro Warrior, but I can't remember... If you go searching for some old version histories for MasterGear or Massage, you might find an explaination, I think Marat or ol' whatsisname actually explained what it was (an unusual but valid way of addressing video ram).

> Or, ask Zoop or Ricardo. Sheesh, yeah, I suppose they -might- just know.

Yes I know.
Now ask me.
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Wed Apr 12, 2000 2:31 pm

Quote
> If you have any inklings on whats causing some of the SMS emulation bugs (Astro Warrior/Golvlius gfx corruption, RType level 3 problem, Altered Beast has ... stopped working! It worked when I did my 7 hour ROM testing marathon...), feel free to clue me in. ;) Also GG emulation is a bit poor, but I've only spent 10 minutes or so to get it to work in a basic way, and haven't implemented the ports 1 through 5 (did implement port 0 tho), so I'll do that before I start fretting the games that aren't working correctly.

I can't run CHASMS. :( But here's my guess at what's wrong:

Golvlius - Bad sprites? Make sure bit 0 of the sprite index is cleared for 8x16 sprites. This game also requires sprite Y-position wrapping in the overworld scenes, used for the status bar.
Astro Warrior / R-Type - Sounds like a VRAM read bug. Just ensure you emulate the buffered read thing and they should work fine.
For Altered Beast, you need good line interrupt emulation, and proper timing. Also, check that you aren't running just 227 cycles per line, but take into account if the CPU emulator ran for more than 227 cycles on the previous line and modify the cycle count accordingly.

Hopefully that will fix some of the problems.
Thanks for crediting me in the docs, btw. :)

  View user's profile Send private message Visit poster's website
Very nice...
  • Guest
Reply with quote
Post Posted: Wed Apr 12, 2000 5:14 pm
Very nice alpha release. I'm running it here at work on a Celeron 300a (OC'ed at 374) and it's running at full speed. Good job! Hope to hear more from this emulator in the future.
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: CHASMS... that was strange
Post Posted: Wed Apr 12, 2000 11:42 pm
I just tried out CHASMS here at work and...
it seems to have loaded Tetris all by itself...
Does CHASMS pick a cart from the current directory to load when it starts up?

Anyhow, looks good, though I didn't have much of a chance to use it (Boss is in the room. He probably wouldn't be particularly upset to see me playing games at work, but I don't like to push it)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: CHASMS... that was strange
Post Posted: Wed Apr 12, 2000 11:42 pm
I just tried out CHASMS here at work and...
it seems to have loaded Tetris all by itself...
Does CHASMS pick a cart from the current directory to load when it starts up?

Anyhow, looks good, though I didn't have much of a chance to use it (Boss is in the room. He probably wouldn't be particularly upset to see me playing games at work, but I don't like to push it)
  View user's profile Send private message Visit poster's website
vecna
  • Guest
Reply with quote
Re: CHASMS... that was strange
Post Posted: Thu Apr 13, 2000 2:53 am
Quote
> I just tried out CHASMS here at work and...
> it seems to have loaded Tetris all by itself...
> Does CHASMS pick a cart from the current directory to load when it starts up?

Well, no, but I know what happened. [I think] -- Did you press ALT-ENTER to toggle windowed/fullscreen? Even if not, I'm pretty sure this is the problem. With the directInput code I was using, it had problems where it would lose events while it was switching [I HATE directinput. you can't just read an array of keystates! you have to parse input events and manually construct such an array...], and as a result, the ALT and ENTER keys tended to "stick" after you did this. You can press and release ENTER again to shut it off. It's annoying, and I've since fixed it.

Moral of the story: I *hate* windows APIs. But, they're a necessary evil in this day and age. ^_^

- vecna
 
vecna
  • Guest
Reply with quote
Post Posted: Thu Apr 13, 2000 5:46 am
Quote
> I can't run CHASMS. :( But here's my guess at what's wrong:

Why can't you run it? DirectX problems, or ..?

Quote
> Golvlius - Bad sprites? Make sure bit 0 of the sprite index is cleared for 8x16 sprites.

Yep. I actually remember reading that I needed to be sure about the 8x16 sprites only using even chars, but I had forgotten about it while coding. Sure enough, that fixed it. :)

Quote
> Astro Warrior / R-Type - Sounds like a VRAM read bug. Just ensure you emulate the buffered read thing and they should work fine.

Well, this is sort of intriguing. I implemented the VRAM buffered read-ahead thingy and that fixed Astro Warrior (and I think one or two other games as well), but my RType seems to be something else. Problem is, I haven't the FAINTEST idea what it could be. I checked this against NeoSMS (Michael Montague's unreleased emulator), and it has the same R-Type bug, so, I'm at a loss... MASSAGE doesn't, but then I can't make heads or tails of it's source. ^_^

Quote
> For Altered Beast, you need good line interrupt emulation, and proper timing. Also, check that you aren't running just 227 cycles per line, but take into account if the CPU emulator ran for more than 227 cycles on the previous line and modify the cycle count accordingly.

Eeesh. Well, I hadn't thought of the cycle "overflow" count, and I implemented that, and, well, it hasn't really changed anything. :/ I think something larger is amiss with my timing somewhere. I have a few ideas of what to investigate however. I appreciate you mentioning that, however, as I'm sure that will help once I figure out the other problems I'm having with timing. Altered Beast still won't load, and Choplifter has some funky lineint issues on level 2 - I even tried experimentally dumping the interrupt code from your doc in there, and it still did the exact same thing as with my code, leading me to believe the problem there is also with timing.

Quote
> Thanks for crediting me in the docs, btw. :)

Thanks for putting out such a thorough and helpful VDP doc! :)

- vecna
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Thu Apr 13, 2000 2:27 pm

Quote
> Why can't you run it? DirectX problems, or ..?

I believe I probably have the same error message Zoop is talking about in his post: "The CHASMS.EXE file is linked to missing export DINPUT.DLL:DirectInputCreateEx."
Though I've used DirectX programs in the past with no problems.

Quote
> but my RType seems to be something else.

If memory serves, that's the hard level with all the little
dots and where you can do the hidden stage trick. :)

I figured it was reading VRAM because keeping the position of
those dots would waste normal RAM. Maybe it has some on-cart
RAM instead (in case you don't have that emulated yet).

I'm glad you mentioned this, because I've never bothered to
check this level in my own emu. ;)


Quote
> Eeesh. Well, I hadn't thought of the cycle "overflow" count, and I implemented that, and, well, it hasn't really changed anything. :/

I mentioned it just because I got Altered Beast working OK,
but the effect on the title screen stopped short by ~8 lines.
Adding this seemed to make it span the display correctly, though
this could just be a timing issue with RAZE, and not affect other
CPU emulators.

Quote
> Altered Beast still won't load, and Choplifter has some funky lineint issues on level 2 - I even tried experimentally dumping the interrupt code from your doc in there, and it still did the exact same thing as with my code, leading me to believe the problem there is also with timing.

I think I may know what the problem is;

The Z80 emulator by Marat Fayzullin does not allow for complete
control of the IRQ line. Other emu's like RAZE let you raise and
lower the IRQ line, which is absolutely important for the SMS,
since games will keep the IRQ line high prior to reading the
control port.

I don't know what the fix would be. Zoop has that feature working
in Meka (I think), maybe he hacked up the Z80 emulator for
more complete IRQ line control. If you decide to switch Z80
cores, the MAME one has excellent performance and is very accurate.
It makes a good and more up to date replacement for Marat's emu.


  View user's profile Send private message Visit poster's website
vecna
  • Guest
Reply with quote
Post Posted: Thu Apr 13, 2000 4:22 pm
Quote
> > but my RType seems to be something else.

> I figured it was reading VRAM because keeping the position of
> those dots would waste normal RAM. Maybe it has some on-cart
> RAM instead (in case you don't have that emulated yet).

Almost. ;) that's the fourth level, the level after this. I have problems right at the END of level 3. This is the level with the huge green battleship that slowly scrolls by. Right at the end, all of the new tiles it starts drawing in as the level scrolls become totally corrupted. Which is also irritating because not only is the visuals messed up, but if you run into the corrupted regions, you still die. :'( Itd be interesting to see if the levels after that works. I cant' remember if theres a level select in that game or not, I mostly played it without cheats aside from the Continues.

On-cart RAM. I'm confused, you mean some other type of on-cart RAM aside from SaveRAM? I know that Rtype doesnt have any battery backup RAM.. even if it tried to page in RAM, it would just be interpreted as SaveRAM but it should still work.

Quote
> I think I may know what the problem is;

This is actually what I had suspected. I was looking at the IntZ80 code and didn't feel terribly comfortable that it was handling things properly. I was planning on switching CPU cores to an Assembler one, but I was originally wanting to have everything stable FIRST, seems I may be switching in order to get things stable. I was going to use RAZE; would you suggest the MAME one instead?

Also, since Marat's doesn't handle the IRQ line, I've not much experience with it, and I'm a bit unsure how it works. This is my understanding:

When an interrupt is supposed to go off, you raise the irq line, the interrupt is triggered, and the irq line stays high until the status port is read.

If an IRQ is supposed to go off while the IRQ line is high, or while interrupts are disabled, they dont. But.. they go off when the IRQ line is lowered or interrupts are re-enabled? This is what I interpreted from the bit in your doc about the Z80 never 'missing' an interrupt, but I'm not sure if this is actually what you meant or not.

Thanks again :)

- vecna
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Post Posted: Thu Apr 13, 2000 5:40 pm

Alright, I was totally off about R-Type, forget the RAM stuff too.

Maybe you already handle this, but I remember R-Type and a few
other games writing values to the bankswitch registers that
were too big. Doing something like 'page = data % num_pages'
fixes the problem, and this could be what you need.

Quote
> This is actually what I had suspected. I was looking at the IntZ80 code and didn't feel terribly comfortable that it was handling things properly. I was planning on switching CPU cores to an Assembler one, but I was originally wanting to have everything stable FIRST, seems I may be switching in order to get things stable. I was going to use RAZE; would you suggest the MAME one instead?

I'd say you should use the MAME one. I personally like RAZE, but
I think there could be a bug or two in it, and you don't want to
spend all day working on your SMS emulator just to find the
bug was the CPU emulator's fault in the first place. But by
all means, switch to RAZE when you have everything debugged. :)

If you do use the MAME core, I'll save you some frustration
and point out that you need to set up the IRQ callback handler
to return 0xFF before doing anything.

Quote
> When an interrupt is supposed to go off, you raise the irq line, the interrupt is triggered, and the irq line stays high until the status port is read.

Exactly.

In theory, setting an interrupt enable bit when there's a pending
interrupt would cause an interrupt, and clearing the enable bit
when there's a pending interrupt would stop the interrupt. But
no game to my knowledge does that, even though it does apply
to the TMS9918.

Quote
> If an IRQ is supposed to go off while the IRQ line is high, or while interrupts are disabled, they dont. But.. they go off when the IRQ line is lowered or interrupts are re-enabled?

Also correct.



  View user's profile Send private message Visit poster's website
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Bankswitching value
Post Posted: Fri Apr 14, 2000 8:25 pm
Quote
> Maybe you already handle this, but I remember R-Type and a few
> other games writing values to the bankswitch registers that
> were too big. Doing something like 'page = data % num_pages'
> fixes the problem, and this could be what you need.

In most cases they set bit 7 to 1.
  View user's profile Send private message Visit poster's website
vecna
  • Guest
Reply with quote
Re: Bankswitching value
Post Posted: Fri Apr 14, 2000 8:52 pm
Quote
> > Maybe you already handle this, but I remember R-Type and a few
> > other games writing values to the bankswitch registers that
> > were too big. Doing something like 'page = data % num_pages'
> > fixes the problem, and this could be what you need.

> In most cases they set bit 7 to 1.

Well.. the arguement is sort of moot since I was already doing value % num_pages, unfortunately.

In the last few days I've built CHASMS directories with tons of different cpu cores. Not something that's particularly fun, but blargh. I've become somewhat aware that at least some of the bugs I encounter in games may or may not occur depending on the CPU emulator I'm using. I haven't tried the R-Type level 3 bug in specific, but, for instance, the controls in Simpsons vs. the Space Mutants is messed up with Marat's, but works in RAZE. On the flip side, I *cannot* get my movies to work with RAZE -- when they do work, they lose synch somehow (which should NEVER HAPPEN with how I've implemented it... waah) So, I'm currently building versions of chasms with other cpu emulators, hoping to find one that works well for my purposes.

- vecna
 
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: Bankswitching value
Post Posted: Sat Apr 15, 2000 12:39 am

Quote
> In the last few days I've built CHASMS directories with tons of different cpu cores. Not something that's particularly fun, but blargh. I've become somewhat aware that at least some of the bugs I encounter in games may or may not occur depending on the CPU emulator I'm using. I haven't tried the R-Type level 3 bug in specific, but, for instance, the controls in Simpsons vs. the Space Mutants is messed up with Marat's, but works in RAZE. On the flip side, I *cannot* get my movies to work with RAZE -- when they do work, they lose synch somehow (which should NEVER HAPPEN with how I've implemented it... waah) So, I'm currently building versions of chasms with other cpu emulators, hoping to find one that works well for my purposes.

There's a bug in the BIT instruction that affects the Simpsons game, Zoop fixed it but I do not know if the current released version of the Z80 core has that fix included.

Maybe I'm thinking of Marcel's core (Z80EM), but there's also a bug with the repeated output instructions (otir or something like that), which affect the background in Terminator.



  View user's profile Send private message Visit poster's website
vecna
  • Guest
Reply with quote
R-Type bug _was_ Marat..
Post Posted: Sat Apr 15, 2000 4:50 am
I just confirmed... RType doesn't have that level 3 corruption with Marat's core. There's at least one game that works with Marat's that doesn't with RAZE, tho. And I still havent been able to get movies to work with RAZE. Sigh. I guess I'll just keep hacking away at it. :)

- vecna
 
Reply to topic



Back to the top of this page

Back to SMS Power!