Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Stupid Mode 4   Message List  
Reply | Forward Message #7171 of 15019 |
RE: [gbadev] Stupid Mode 4

u8 | (u8 << 8) will work better, assuming C operator precedence.

-----Original Message-----
From: Dale Freya [mailto:dfreya@...]
Sent: Sunday, September 30, 2001 9:27 PM
To: gbadev@yahoogroups.com
Subject: RE: [gbadev] Stupid Mode 4


U16 = u8 | u8 << 8
Component 2 is shifted left 8 bits into the high part of the word.

- Dale


-----Original Message-----
From: Mr SDFG ASDG [mailto:cupcakus2000@...]
Sent: Sunday, 30 September 2001 12:50 AM
To: gbadev@yahoogroups.com
Subject: Re: [gbadev] Stupid Mode 4


I figured it out with:
u16=u8*256+u8
There is probably a better way, like an operator that can do it, but for
the mean time the formula above works great.
  Mr SDFG ASDG <cupcakus2000@...> wrote: I have a 256 color bitmap
which I have processed into a u16 pallet array, and a u8 data array with
indexes to the pallet information.

The problem of course is that video memory only accepts writes in
16bits, so one would simply say:
"Write two pixels at once..."  I would love to! How do I combine the two
8 bit blocks of data into one 16bit block?




Tue Oct 2, 2001 5:44 am

eddie@...
Send Email Send Email

Forward
Message #7171 of 15019 |
Expand Messages Author Sort by Date

I have a 256 color bitmap which I have processed into a u16 pallet array, and a u8 data array with indexes to the pallet information. The problem of course is...
Mr SDFG ASDG
cupcakus2000@...
Send Email
Sep 29, 2001
9:36 am

something like this, obviously this is from a mode 0 example, but just replace the names and you're off, for (y=0;y<20;y++) { for (x=0;x<30;x++) { i =...
Mike Watts
starboy@...
Send Email
Sep 29, 2001
11:38 am

I figured it out with: u16=u8*256+u8 There is probably a better way, like an operator that can do it, but for the mean time the formula above works great. Mr...
Mr SDFG ASDG
cupcakus2000@...
Send Email
Sep 29, 2001
2:51 pm

Hy there, actually, if I am not mistaken, GBA VRAM supports 8bit writes quite happily. However, you should not do it, since more copy operations are necessary....
Emanuel Schleussinger
tubooboo@...
Send Email
Sep 29, 2001
3:18 pm

U16 = u8 | u8 << 8 Component 2 is shifted left 8 bits into the high part of the word. - Dale ... From: Mr SDFG ASDG [mailto:cupcakus2000@...] Sent:...
Dale Freya
dfreya@...
Send Email
Oct 1, 2001
4:49 am

u8 | (u8 << 8) will work better, assuming C operator precedence. ... From: Dale Freya [mailto:dfreya@...] Sent: Sunday, September 30, 2001 9:27 PM...
Eddie Edwards
eddie@...
Send Email
Oct 2, 2001
7:56 am

No, you can't perform 8bit writes to VRAM, some of the emulators may let you, but you can't do it on the real hardware... ... From: Emanuel Schleussinger...
Mike Watts
starboy@...
Send Email
Sep 29, 2001
6:50 pm

... array, and a u8 data array with indexes to the pallet information. ... the two 8 bit blocks of data into one 16bit block? Simply cast the array to a u16*...
DekuTree64@...
Send Email
Sep 30, 2001
5:14 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help