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 - Program releases / V counter info update

Reply to topic
Author Message
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Program releases / V counter info update
Post Posted: Thu Aug 02, 2001 2:07 am

I've released four SMS programs, with binary and sources included:

- V counter test
- 64 colors at once demonstration
- Background scrolling program (looks weird on several emus)
- 6-button pad test (use Genesis controllers on the SMS!)

They should all be SDSC compliant, but no guarantees. ;)

I've also updated the smsvideo.txt file with data from Zoop and with added information about the horizontal aspects of the display.

You can get all of this stuff here: (look for the 'NEW' text next to the links)

http://cgfm2.emuviews.com/segastuf.htm

The Genesis / Mega Drive version of the V counter test is also at the same page.


  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
Spiderman Return of Sinister 6 working..
Post Posted: Thu Aug 02, 2001 10:19 am
I tried a small change after reading your SMsvideo.txt doc to my emulator. Basically I just made it set bit 7 of the status on line 193 instead of 192. This had the effect of making Spiderman Return of the SInister 6 work... so I am questioning whether or not the bit is actually set on line C1 in 192 line mode as how else could a line interupt and v-interupt be detected as two different interupts? Just a question for thought. I will post more results with different games soon possibly.
-Jason Starr-
 
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Report on scrolling program
Post Posted: Thu Aug 02, 2001 10:23 am
No emulators does it perfectly, the closer being Master Gear :-)

There's two usual problems :

1. the right non scrolling part
nothing special to say about it. it shouldn't scroll like it does on Meka (and FreezeSMS, etc..). i'm not sure why it is happening, I'll give it a check, but it should be easily fixable.

however
2. the most left columns
It is NOT masked, as shown in your code (thanks for forgetting to mask it :)
the graphics at this place are quit interesting.

- on meka, you can see garbage due to optimisation i made asserting that it would be masked when scrolling
- on other emulators (well those i have tried), you see the other side coming in
- however on a real machine, you can see there the background color at the place of the tile that has not completely entered in the screen yet
it's like on Meka, except that the garbage left from previous frame, is gray

That's it.
Emulating that feature may (or may not, I haven't checked it seriously yet) prevent from doing some optimisations, so it's up to everyone to choose. Knowing that absotutly no commercial game scrolls with a non masked left most column.
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
GP Rider now does not have any glitches either *nt*
Post Posted: Thu Aug 02, 2001 10:24 am
Quote
> I tried a small change after reading your SMsvideo.txt doc to my emulator. Basically I just made it set bit 7 of the status on line 193 instead of 192. This had the effect of making Spiderman Return of the SInister 6 work... so I am questioning whether or not the bit is actually set on line C1 in 192 line mode as how else could a line interupt and v-interupt be detected as two different interupts? Just a question for thought. I will post more results with different games soon possibly.
> -Jason Starr-
 
PolestaR
  • Guest
Reply with quote
Re: Report on scrolling program
Post Posted: Thu Aug 02, 2001 10:37 am
Its scrolling because from the docs i had i didnt know setting that bit made the last 8 columns also NON HSCROLLable. Is this tested on a real sms? I thought it was only non Vscrollable. Ahwell no game uses this and as Zoop said, including the non hscrolling may incur quite a bit of speed lost in emu's. But anyways if thats how it happens on the real SMS, I guess you should emulate it :0.
-Jason Starr-
 
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14690
  • Location: London
Reply with quote
What it looks like on an SMS2 (78KB animated gif)
Post Posted: Thu Aug 02, 2001 11:34 am


Note that IE doesn't handle this image very well, I grudgingly admit NS has better animated GIF code.

Maxim
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
Re: What it looks like on an SMS2 (78KB animated gif)
Post Posted: Thu Aug 02, 2001 12:52 pm
Well looks like it still is side scrolling the rightmost 8 columns. Charles why did you think it didnt hscroll the last 8.. any reason? My emulator display is slightly 'off' compared to a real SMS, I might fix it to look like how Maxims gif shows it. Maxim the gif looks fine in IE 6.0 which I am using, I didnt know IE had problems with GIFs, explain son :P
-Jason Starr-
 
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14690
  • Location: London
Reply with quote
(OT) IE and gifs
Post Posted: Thu Aug 02, 2001 1:19 pm
Quote
> Maxim the gif looks fine in IE 6.0 which I am using, I didnt know IE had problems with GIFs, explain son :P

Well, father... in IE5.5 it's jerky, slow, and it's using 100% CPU. Of course you'll blame my crappy computer, but in NS4.7 it's smooth and fast and not so CPU-hungry. Neither really does it justice though... I did make an AVI but that was even worse, WMP doesn't like looping a 4 frame AVI...

Maxim

Completely unrelated image
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: What it looks like on an SMS2 (78KB animated gif)
Post Posted: Thu Aug 02, 2001 2:32 pm
Quote
> Well looks like it still is side scrolling the rightmost 8 columns. Charles why did you think it didnt hscroll the last 8.. any reason? My emulator display is slightly 'off' compared to a real SMS, I might fix it to look like how Maxims gif shows it. Maxim the gif looks fine in IE 6.0 which I am using, I didnt know IE had problems with GIFs, explain son :P
> -Jason Starr-

I think in the readme, it says the right 8 rows won't scroll vertically.
They are supposed to be moving horizontally, Maxim's image looks exactly like it does on a Genesis. (and according to Zoop, same as an SMS)

  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: Report on scrolling program
Post Posted: Thu Aug 02, 2001 3:00 pm
Quote
> No emulators does it perfectly, the closer being Master Gear :-)

SMS Plus comes darn close. ;)

Quote
> 1. the right non scrolling part
> nothing special to say about it. it shouldn't scroll like it does on Meka (and FreezeSMS, etc..). i'm not sure why it is happening, I'll give it a check, but it should be easily fixable.

Notice that the vertical scroll is applied one column earlier on Master Gear, but not on the actual SMS.
I haven't quite figured out why this is. The Genesis does the same thing in mode 5, just with 16-pixel columns instead of 8.

Quote
> - however on a real machine, you can see there the background color at the place of the tile that has not completely entered in the screen yet

To me, it looks like maybe the VDP isn't smart enough to wrap from column 31 to 0, so it just outputs blank pixels (e.g. border color) until the column to draw is valid. (within 0-31)
I know in mode 5, the screen does wrap correctly when partially scrolled. So it seems to be specific to the SMS only.

I wonder if this has anything to do with the VDP being based on the TMS9918 which has no scrolling capability. Maybe it was simpler to do it this way, from a hardware point of view.

Quote
> That's it.
> Emulating that feature may (or may not, I haven't checked it seriously yet) prevent from doing some optimisations, so it's up to everyone to choose. Knowing that absotutly no commercial game scrolls with a non masked left most column.

Just for the sake of documenting the VDP, I like figuring out this kind of stuff.
But it's not useful for an emulator. (just for debugging them :)


  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Re: Report on scrolling program
Post Posted: Thu Aug 02, 2001 3:08 pm
Quote
>> No emulators does it perfectly, the closer being Master Gear :-)
> SMS Plus comes darn close. ;)

Heh right, I tried to run SMS Plus but my frontend kicked me out, I guess I may have moved the executable.
Are you working like Master Gear ?

Quote
>Notice that the vertical scroll is applied one column earlier on Master Gear, but not on the actual SMS.
>haven't quite figured out why this is. The Genesis does the same thing in mode 5, just with 16-pixel
>columns instead of 8.

Sorry I don't understand what you means.
Seems to be the same in MG and the animation.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: Spiderman Return of Sinister 6 working..
Post Posted: Thu Aug 02, 2001 3:21 pm
Quote
> I tried a small change after reading your SMsvideo.txt doc to my emulator. Basically I just made it set bit 7 of the status on line 193 instead of 192. This had the effect of making Spiderman Return of the SInister 6 work... so I am questioning whether or not the bit is actually set on line C1 in 192 line mode as how else could a line interupt and v-interupt be detected as two different interupts? Just a question for thought. I will post more results with different games soon possibly.
> -Jason Starr-

This is really interesting. You are right, it does fix Spider Man, and no other games seem to be broken.

I tried running two small programs, one reads the V counter as soon as the IRQ routine starts (caused be a frame interrupt) and the other one reads the V counter as soon as bit 7 of $BF is set. (it polls the VDP status port manually)

The interrupt-driven program always read the V counter as $C1, never $C0.
However, the bit 7 testing one was always set at $C0.

So, maybe there is some kind of delay between when bit 7 is set and when an interrupt occurs?
I really doubt the interrupt latency is long enough for the V counter to go from $C0 to $C1, so that can't be it.

I had just assumed the interrupt happened at line $C0, since all the docs say that, and the Genesis works in the same way in it's native display mode.
Looks like that wasn't a good idea. ;)


  View user's profile Send private message Visit poster's website
  • Joined: 28 Sep 1999
  • Posts: 1197
Reply with quote
Re: Report on scrolling program
Post Posted: Thu Aug 02, 2001 3:29 pm

Quote
> Are you working like Master Gear ?

I don't have the MG sources handy, so I'm not sure how close the rendering methods are.

Quote
> Sorry I don't understand what you means.
> Seems to be the same in MG and the animation.

Actually, I might be wrong. The corner of the tile in column 24 on row 1 looks different on my TV, compared to MG.
But I can't really explain it. :


  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Re: Spiderman Return of Sinister 6 working..
Post Posted: Thu Aug 02, 2001 3:37 pm
Quote
> This is really interesting. You are right, it does fix Spider Man, and no other games seem to be broken.

Charles, I think we discussed about that a while ago already :)
Zool needs something related (I don't remember exactly what, but probably the exact same thing) to start its game.
I'm myself processing H line interrupt up to line 192 (included) and throwing v interrupt on 192+1 (or 224+1).
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
But..
Post Posted: Thu Aug 02, 2001 3:48 pm
Master Gear 1.0 works well with Spiderman, and start VBL at line 192 (judging by its sources).
  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
about the 8 tile vscroll lock
Post Posted: Thu Aug 02, 2001 4:57 pm
Quote
> > 1. the right non scrolling part
> > nothing special to say about it. it shouldn't scroll like it does on Meka (and FreezeSMS, etc..). i'm not sure why it is happening, I'll give it a check, but it should be easily fixable.

> Notice that the vertical scroll is applied one column earlier on Master Gear, but not on the actual SMS.

One column of pixels, or one column of tiles?
Thinking back on it, one of the three games games I can think of that use the vertical scroll lock bit is golvelius (in the vertically scrolling cave sequences), and the leftmost column of the nonscrolling status bar is made up of a gradient of vertical lines, so that if it were scrolling you wouldn't be able to tell.

Perhaps the exact cutoff point is not clearly defined, so the recommended behavior for games using the fixed area is to make the first column of tiles blank or repeating so it wouldn't look different if it were scrolling or not.


Incidentally, just to make sure I understand, on a real SMS the 8column fixed vertical scrolling area should still be affected by hscroll as normal, right?
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
yes true... but
Post Posted: Thu Aug 02, 2001 5:07 pm
Quote
> Master Gear 1.0 works well with Spiderman, and start VBL at line 192 (judging by its sources).

Yah but its basically doing the same thing. If a HINT is set on line 192 then it returns prematurely before setting the VDPStatus bit 7. ANd next frame, ie 193, it sets it to 7. It doesnt look like this breaks anything and its about as close as we can get almost on an emulated system without slowing it down chronically.
-Jason Starr-
 
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Three games ?
Post Posted: Fri Aug 03, 2001 12:44 pm
Quote
> Thinking back on it, one of the three games games I can think of that use the vertical scroll lock bit ...

I can only remember of Golvellius & Gauntlet, is there a third one ?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Also, about Gauntlet.
Post Posted: Fri Aug 03, 2001 1:03 pm
Notice it only scrolls from 0 to 8, never more that than.
The columns between scrolling & scrolling parts is made of black sprites to hide scrolling behavior.
  View user's profile Send private message Visit poster's website
PolestaR
  • Guest
Reply with quote
I know LINE OF FIRE also uses this feature *nt*
Post Posted: Fri Aug 03, 2001 3:13 pm
Quote
> > Thinking back on it, one of the three games games I can think of that use the vertical scroll lock bit ...

> I can only remember of Golvellius & Gauntlet, is there a third one ?
 
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Thanks
Post Posted: Fri Aug 03, 2001 4:54 pm
Quote
>>> Thinking back on it, one of the three games games I can think of that use the vertical scroll lock bit ...
>> I can only remember of Golvellius & Gauntlet, is there a third one ?

Thanks, I forgot about that one (yes, it use vscroll-lock).
  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
...and...
Post Posted: Fri Aug 03, 2001 7:36 pm
Quote
> > Thinking back on it, one of the three games games I can think of that use the vertical scroll lock bit ...

> I can only remember of Golvellius & Gauntlet, is there a third one ?

Megumi Rescue. One can almost forget that it scrolls at all. This one doesn't have any space between the status area and the scrolling playfield... so it might look strange on a game gear? (not that you can play it on a game gear anyway).

So, with Line of Fire (which I've not played yet) that makes four.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Thanks! *nt*
Post Posted: Fri Aug 03, 2001 8:24 pm
Quote
> > > Thinking back on it, one of the three games games I can think of that use the vertical scroll lock bit ...

> > I can only remember of Golvellius & Gauntlet, is there a third one ?

> Megumi Rescue. One can almost forget that it scrolls at all. This one doesn't have any space between the status area and the scrolling playfield... so it might look strange on a game gear? (not that you can play it on a game gear anyway).

> So, with Line of Fire (which I've not played yet) that makes four.
  View user's profile Send private message Visit poster's website
Dave
  • Guest
Reply with quote
Great test btw Charles! and good results Maxim!
Post Posted: Fri Aug 03, 2001 10:28 pm

Which games use the 8 right column lock btw?
I didn't find any... that's my weak excuse for not adding it to Dega :)

(Similar excuse for not adding that 8 pixel sprite shift to the left... couldn't find any games which use it afaik...)
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
8 column lock
Post Posted: Fri Aug 03, 2001 10:51 pm
Quote
>
> Which games use the 8 right column lock btw?
> I didn't find any... that's my weak excuse for not adding it to Dega :)

So far;

Golvellius (vertically scrolling underground cave sequence)
Guantlet
Line of Fire
Megumi Rescue


but something in the back of my mind tells me there's at least one more.

Quote
> (Similar excuse for not adding that 8 pixel sprite shift to the left... couldn't find any games which use it afaik...)

Ghouls and Ghosts uses it.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Fri Oct 25, 2013 8:26 am
Charles,

Thanks for the 6 button controller demo.
I'll be using it on my projects!

Anyone against making a genesis/MD controller required for an SMS game? (like does anyone really play with original SMS gamepads anymore?)
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Fri Oct 25, 2013 9:00 am
I would try to be compatible - my game can use SMS and MD 3 and 6 buttoner, but is best played with a MD pad, particularly the 6 buttoner... 3 or 6 buttoner is required to gain access to some secrets :P
  View user's profile Send private message Visit poster's website
  • Joined: 23 Aug 2009
  • Posts: 213
  • Location: Seattle, WA
Reply with quote
Post Posted: Fri Oct 25, 2013 6:45 pm
Is there a way to automatically detect a 3/6 button pad, or do you require the user to tell you?
  View user's profile Send private message
  • Joined: 31 Oct 2007
  • Posts: 853
  • Location: Estonia, Rapla city
Reply with quote
Post Posted: Fri Oct 25, 2013 10:37 pm
You can tell if a 3 or 6 buttoner is attached, they got "ID" bits.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 250
  • Location: Netherlands
Reply with quote
Post Posted: Sat Oct 26, 2013 7:05 am
SavagePencil wrote
Is there a way to automatically detect a 3/6 button pad, or do you require the user to tell you?


For more detial google for "gen-hw.txt". It's a document from Charles MacDonald which contains all ins and out.

@Charles: Is it possible to add this specific part of the document to this site's development part?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14690
  • Location: London
Reply with quote
Post Posted: Sat Oct 26, 2013 9:30 am
You can certainly tell a 6-button from a 3-button as their behaviour is different (and the zeroed D-pad bits ought not to be possible on a 3-button pad), and you can probably assume that if TH has no effect then it is an SMS pad. Mixing it all in with other peripherals might be trickier.
  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!