Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Adventures in small code

Adventures in small code

Scheduled Pinned Locked Moved The Lounge
designc++comgraphicsadobe
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    I have 32KB of flash, and 2.5KB of RAM. I have one 128x32 monochrome screen. Over half that flash, and I don't know how much RAM is taken up by keyboard firmware. In what's left over some friends and I are making a Tamagotchi game. Talk about tricky. Now normally, to dynamically draw to a monochrome screen without readback capability, you have to hold a framebuffer, which takes 512 bytes in this case. We didn't want to use that RAM. The method we're using is to embed RLE compressed entire screens in the screen's native framebuffer format. That way we don't need any RAM at all to display a screen as it just spits the entire screen from flash. The RLE compression in my tests shrinks the final image size to about 1/3 of the size. Each screen, uncompressed is again, .5KB. Not sure if we'll be able to do it still, but it's fun.

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    C T D E 4 Replies Last reply
    0
    • H honey the codewitch

      I have 32KB of flash, and 2.5KB of RAM. I have one 128x32 monochrome screen. Over half that flash, and I don't know how much RAM is taken up by keyboard firmware. In what's left over some friends and I are making a Tamagotchi game. Talk about tricky. Now normally, to dynamically draw to a monochrome screen without readback capability, you have to hold a framebuffer, which takes 512 bytes in this case. We didn't want to use that RAM. The method we're using is to embed RLE compressed entire screens in the screen's native framebuffer format. That way we don't need any RAM at all to display a screen as it just spits the entire screen from flash. The RLE compression in my tests shrinks the final image size to about 1/3 of the size. Each screen, uncompressed is again, .5KB. Not sure if we'll be able to do it still, but it's fun.

      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Did you abandon the monster CPU? Indeed it looks fun. :thumbsup: Enjoy!

      "In testa che avete, Signor di Ceprano?" -- Rigoletto

      H 1 Reply Last reply
      0
      • H honey the codewitch

        I have 32KB of flash, and 2.5KB of RAM. I have one 128x32 monochrome screen. Over half that flash, and I don't know how much RAM is taken up by keyboard firmware. In what's left over some friends and I are making a Tamagotchi game. Talk about tricky. Now normally, to dynamically draw to a monochrome screen without readback capability, you have to hold a framebuffer, which takes 512 bytes in this case. We didn't want to use that RAM. The method we're using is to embed RLE compressed entire screens in the screen's native framebuffer format. That way we don't need any RAM at all to display a screen as it just spits the entire screen from flash. The RLE compression in my tests shrinks the final image size to about 1/3 of the size. Each screen, uncompressed is again, .5KB. Not sure if we'll be able to do it still, but it's fun.

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        T Offline
        T Offline
        trønderen
        wrote on last edited by
        #3

        If you are fascinated by small code in general, take a look at the videos at https://www.pouet.net/[^]. One extreme example: Oscar's Chair[^], an executable of 4092 bytes, encoding a video/sound of about two minutes. Certainly, this code doesn't run on bare iron, but relies on Windows drawing and sound primitives. At runtime, it unpacks to a lot more than 4K of RAM - but the unpacking code fits in those 4092 bytes, along with everything that is specific to this movie of graphics and sound. It is really an impressing piece of work! You can find several other 4K videos (executable size, not line resolution!) at www.pouet.net. I also like Skyline[^]. Clicking at "4k" near the top right on the pouët page takes you to a long list, where you also can select other sizes, platforms and categories. They are not all for Windows.

        Religious freedom is the freedom to say that two plus two make five.

        1 Reply Last reply
        0
        • H honey the codewitch

          I have 32KB of flash, and 2.5KB of RAM. I have one 128x32 monochrome screen. Over half that flash, and I don't know how much RAM is taken up by keyboard firmware. In what's left over some friends and I are making a Tamagotchi game. Talk about tricky. Now normally, to dynamically draw to a monochrome screen without readback capability, you have to hold a framebuffer, which takes 512 bytes in this case. We didn't want to use that RAM. The method we're using is to embed RLE compressed entire screens in the screen's native framebuffer format. That way we don't need any RAM at all to display a screen as it just spits the entire screen from flash. The RLE compression in my tests shrinks the final image size to about 1/3 of the size. Each screen, uncompressed is again, .5KB. Not sure if we'll be able to do it still, but it's fun.

          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #4

          Wow, you managed to outclass me, I have 128kB of flash and 6 kB of RAM!

          GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

          H C 2 Replies Last reply
          0
          • C CPallini

            Did you abandon the monster CPU? Indeed it looks fun. :thumbsup: Enjoy!

            "In testa che avete, Signor di Ceprano?" -- Rigoletto

            H Offline
            H Offline
            honey the codewitch
            wrote on last edited by
            #5

            Nah, this is just a separate thing.

            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

            1 Reply Last reply
            0
            • D den2k88

              Wow, you managed to outclass me, I have 128kB of flash and 6 kB of RAM!

              GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

              H Offline
              H Offline
              honey the codewitch
              wrote on last edited by
              #6

              How luxurious!

              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

              1 Reply Last reply
              0
              • D den2k88

                Wow, you managed to outclass me, I have 128kB of flash and 6 kB of RAM!

                GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

                C Offline
                C Offline
                CPallini
                wrote on last edited by
                #7

                32/4. :)

                "In testa che avete, Signor di Ceprano?" -- Rigoletto

                1 Reply Last reply
                0
                • H honey the codewitch

                  I have 32KB of flash, and 2.5KB of RAM. I have one 128x32 monochrome screen. Over half that flash, and I don't know how much RAM is taken up by keyboard firmware. In what's left over some friends and I are making a Tamagotchi game. Talk about tricky. Now normally, to dynamically draw to a monochrome screen without readback capability, you have to hold a framebuffer, which takes 512 bytes in this case. We didn't want to use that RAM. The method we're using is to embed RLE compressed entire screens in the screen's native framebuffer format. That way we don't need any RAM at all to display a screen as it just spits the entire screen from flash. The RLE compression in my tests shrinks the final image size to about 1/3 of the size. Each screen, uncompressed is again, .5KB. Not sure if we'll be able to do it still, but it's fun.

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  E Offline
                  E Offline
                  englebart
                  wrote on last edited by
                  #8

                  My familiar just whispered:

                  Quote:

                  Codewitch will replace the keyboard driver with a 4k version.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups