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 - Fast conversion to planar format, anyone?

Reply to topic
Author Message
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Fast conversion to planar format, anyone?
Post Posted: Thu Jun 01, 2017 11:47 am
I was wondering what's the fastest method to convert 8 pixels colors to the planar format we need for the SMS.
I mean, source can be 8 bytes, 4 bytes, whatever actually, but output should be the 4 bytes we need to push to VRAM.
Anyone? :)
  View user's profile Send private message Visit poster's website
  • Joined: 01 Jan 2014
  • Posts: 331
Reply with quote
Post Posted: Thu Jun 01, 2017 2:21 pm
I did this but can't find the code. Not sure if this is the fastest but from memory i did something like this.

- ld a, (hl), inc hl... running over input.
- shift values in to b, c, d, e
- when bcde are full write them to ram using stack.

Use outd to compensate for reverse order.

Was something like that.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3827
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu Jun 01, 2017 2:49 pm
oh, I see the point. thanks for the directions! :)
  View user's profile Send private message Visit poster's website
  • Joined: 14 Apr 2013
  • Posts: 624
Reply with quote
Post Posted: Thu Jun 01, 2017 2:59 pm
psidum wrote
I did this but can't find the code. Not sure if this is the fastest but from memory i did something like this.

- ld a, (hl), inc hl... running over input.
- shift values in to b, c, d, e
- when bcde are full write them to ram using stack.

Use outd to compensate for reverse order.

Was something like that.

I suppose you are talking about this post? :)
http://www.smspower.org/forums/15469-ChunkyToPlanarOnSMS
  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!