drhelius / Gearsystem

Sega Master System / Game Gear / SG-1000 emulator for macOS, Windows, Linux, BSD and RetroArch.
https://x.com/drhelius
GNU General Public License v3.0
247 stars 45 forks source link

Chunky pixel (doubled sprite pixels) mode supported? #56

Closed mikehdt closed 2 years ago

mikehdt commented 2 years ago

Does Gearsystem support chunky pixel mode?

I've been using SMSlib to do some coding for fun, but it seems that whilst Emulicious and Meka both handle turning chunky (w/h doubled) sprite mode on, Gearsystem only seems to display sprites at their original 1:1 size. It's true that it's a not commonly utilised mode, but it can be invaluable for helping fake certain effects without running into the 8-sprite-per-scanline limit.

drhelius commented 2 years ago

I'm not familiar with chunky pixel mode, can you point me to some doc? Is this something the real hardware can do?

mikehdt commented 2 years ago

Yup, although from what I understand the original SMS had some hardware issues if you used > 4 doubled sprites in a single scanline. This was fixed in the SMS2 / Game Gear.

One reference: https://www.smspower.org/uploads/Development/msvdp-20021112.txt From the bit on Register $01: D1 - Sprites are 1=16x16,0=8x8 (TMS9918), Sprites are 1=8x16,0=8x8 (Mode 4), maybe also D0 - Sprite pixels are doubled in size.

Thread on some games which used it: https://www.smspower.org/forums/1659-SMSQueries

SMSlib's internal code that sets the flag for this: https://github.com/sverx/devkitSMS/blob/master/SMSlib/src/SMSlib.c#L163

drhelius commented 2 years ago

Probably I just forgot to implement it (-:

Thanks for reporting, I'll take a look and get back to you

drhelius commented 2 years ago

For some reason I implemented zoomed sprites for SG-1000 but not for SMS/GG. I will change that, thanks again for reporting.