* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Graphics and other system routines  (Read 9602 times)

0 Members and 1 Guest are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Graphics and other system routines
« Reply #45 on: November 13, 2015, 08:27:29 am »
By the way, will there be commands to draw rectangles with customizeable opacity, within the palette limits, like on the HP Prime? That would be handy for some special effects.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Streetwalrus

  • Professional slacker
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Israel
  • Posts: 2903
  • Post Rating Ratio: +20/-0
  • ƎW∀⅁ ƎH⊥
  • Gender: Male
Re: Graphics and other system routines
« Reply #46 on: November 13, 2015, 09:05:46 am »
It's not very easy to do with paletted colors. Alpha blending requires access to the raw colors.
  • Calculators owned: TI-80, HP 40G, TI-84 Plus rev G (yay 128k RAM), TI-83 Plus Silver Edition (broken LCD), TI-82 Stats.fr (black), TI-Nspire CX rev C (yay Nlaunchy), TI-83+ SE ViewScreen



Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
Re: Graphics and other system routines
« Reply #47 on: November 13, 2015, 11:15:12 am »
By the way, will there be commands to draw rectangles with customizeable opacity, within the palette limits, like on the HP Prime? That would be handy for some special effects.
Well memory use is a big concern so we went for palettes as you know. We aren't using RGB. Sprites and the graphic functions have access to the screen buffer which is using these global palette colors.
But as you know we have 4 different pixel formats being 1bpp (transparent + 1 color), 2bpp (transparent + 3 colors), 4bpp (transparent + 15 colors) and 8bpp (which has all palette colors). The global palette has 216 colors that are predefined and cannot be changed at all. Then we also have a transparent color which, when used in sprites or graphic functions not drawn to the screen buffer. And the special thing is that we also have a dynamic set of 39 custom RGB colors that can be changed by any game at any point. These colors can be used in any graphics function or sprite. When the screen is synced the next time (which games need to do manually by calling a command) after the colors have been altered, the screen can look entirely different. But back to your question, no I doubt we will do such alpha blending as its hard and basically wouldn't work to well.

It's not very easy to do with paletted colors. Alpha blending requires access to the raw colors.
Yes. Maybe using the dynamic colors it's possible to do so but I really doubt it will work.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Graphics and other system routines
« Reply #48 on: November 15, 2015, 06:30:43 am »
I see. I guess for fade-in effects I'll just create extra copies of my sprites then make them go darker by switching colors to the nearest available darker color in the palette. :P
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline adekto

  • Full User
  • Join Date: Aug 2015
  • Location:
  • Posts: 26
  • Post Rating Ratio: +0/-0
Re: Graphics and other system routines
« Reply #49 on: November 15, 2015, 08:09:52 am »
I see. I guess for fade-in effects I'll just create extra copies of my sprites then make them go darker by switching colors to the nearest available darker color in the palette. :P
wel there are other ways to do that replacing the variable color pallet part could do a fade to a set color (no blending, but sorta what you want)
also if you use a custom pallet and use say only grey's, you could in theory do a adetive color blend but its a bit complicated

Offline semiprocoder

  • Full User
  • Join Date: May 2015
  • Location:
  • Posts: 282
  • Post Rating Ratio: +2/-0
    • awesommee333
    • 114/11470
  • Gender: Male
Re: Graphics and other system routines
« Reply #50 on: November 15, 2015, 03:08:15 pm »
I know that you said you don't support 16 bit color mode anymore, but couldn't you just leave it as an option instead of completely removing it? Maybe with that mode you would have half of the screen rendered at a time. Also could you support 12 bit color mode? Its unconventional but I think it could work.
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
Re: Graphics and other system routines
« Reply #51 on: November 15, 2015, 03:28:23 pm »
I know that you said you don't support 16 bit color mode anymore, but couldn't you just leave it as an option instead of completely removing it? Maybe with that mode you would have half of the screen rendered at a time. Also could you support 12 bit color mode? Its unconventional but I think it could work.
No, sorry but supporting any of these is not really possible. You can directly talk to the OLED, but this is very discouraged. You won't end up using 16 bit colors anyways. I don't see any use for them really. And if the 216 colors don't contain the colors you like, then you can always use the 39 16 bit colors that can be defined at runtime.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline adekto

  • Full User
  • Join Date: Aug 2015
  • Location:
  • Posts: 26
  • Post Rating Ratio: +0/-0
Re: Graphics and other system routines
« Reply #52 on: November 15, 2015, 10:11:25 pm »
an alternative system to acheave a blend is true overlaped ditered sprites, or some sort of mask
here is a 3D example from pico8 (they do some neat stuff) but the thing i would like you take notice of is that they use a 16 color pallet and use 2 textures and use ditering to achive the lighting
http://www.lexaloffle.com/bbs/?tid=2688&autoplay=1#pp
its not perfect but in theory it can work

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Graphics and other system routines
« Reply #53 on: November 22, 2015, 07:39:30 am »
If we can change the color palette we are currently using for the sprites on screen refresh, then I guess that can be used for special effects too. I could live without it, but it was nice to be able to do it on the NES. :)
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
Re: Graphics and other system routines
« Reply #54 on: November 22, 2015, 12:52:54 pm »
If we can change the color palette we are currently using for the sprites on screen refresh, then I guess that can be used for special effects too. I could live without it, but it was nice to be able to do it on the NES. :)
You can change 39 colors of the palette.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Graphics and other system routines
« Reply #55 on: November 22, 2015, 11:15:03 pm »
That's good enough to me. Just as long as making sprites is as easy as just using Paint. :P I got plenty of 8*8 sprites at low color depth.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline semiprocoder

  • Full User
  • Join Date: May 2015
  • Location:
  • Posts: 282
  • Post Rating Ratio: +2/-0
    • awesommee333
    • 114/11470
  • Gender: Male
Re: Graphics and other system routines
« Reply #56 on: November 23, 2015, 12:38:07 am »
Can you only change the value of the 39 extra colors each frame or each time you draw something?
  • Calculators owned: ti nspire, ti 84 plus se
My cemetech username is awesommee333.

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
Re: Graphics and other system routines
« Reply #57 on: November 23, 2015, 12:45:48 am »
Can you only change the value of the 39 extra colors each frame or each time you draw something?
Well each frame. The screen buffer is global so is the palette. If you change the dynamic colors, everything that has been drawn using these dynamic colors and is currently visible on the screen will be changed.
Drawing does not show anything on the screen. The buffer need to be swapped in order to see the newly generated image from the buffer. When generating it, the current dynamic palette and the static palette is used to resolve the RGB colors sent to the screen (OLED).
That's good enough to me. Just as long as making sprites is as easy as just using Paint. I got plenty of 8*8 sprites at low color depth.
Well you can't use the 39 dynamic colors in paint. We will come up with a way to use them at some point.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Graphics and other system routines
« Reply #58 on: November 23, 2015, 04:23:05 am »
Oh I meant in general. One major issue with individual sprites in Doors CSE is that there is no way to edit them other than typing the hexadecimal by hand. Entire sprite sheets are editable, but not individual sprites (DCSE supports inline sprites). Even SourceCoder lacks that feature.

This is definitively something that needs to be avoided with Microcat and claw. I'm confident that you'll find a way to make sprite editing/importing easy, though.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18727
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Graphics and other system routines
« Reply #59 on: November 24, 2015, 07:55:27 am »
So I am curious about what the following sprites would look like in Microcat format and how much space they would take:



Would the sprite sheet need to be split into multiple files and only one part loaded at a time?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio BroniesQC TI-Planet BosaikNet