Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Custom Terminal

    Creation share codes
    3
    13
    603
    Loading More Posts
    • 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.
    • E
      EvanTropFun last edited by

      Ho it's very cool for make fake MS-DOS thank you ! Do you can create a function scanf ?

      1 Reply Last reply Reply Quote 1
      • E
        EvanTropFun last edited by

        He i can't download you project ! )':
        (project not found)

        L 1 Reply Last reply Reply Quote 0
        • L
          LucasJG25 @EvanTropFun last edited by

          @EvanTropFun I think it's still pending. Will be live soon

          1 Reply Last reply Reply Quote 0
          • E
            EvanTropFun last edited by

            Ok but well done anyway !

            L 1 Reply Last reply Reply Quote 0
            • L
              LucasJG25 @EvanTropFun last edited by

              @EvanTropFun Thank you! Concerning your request for scanf(). That's a C function that allows you to input a string/number or float.

              My Terminal mainly prints strings to the buffer while keeping track of the cursor and the color of the text. So implementing a scanf() function would need to be done within the said VM that implements this Terminal.

              1 Reply Last reply Reply Quote 1
              • L
                LucasJG25 last edited by

                Here is my Terminal connected to the Hack VM. But it's very bare bones currently and needs more functionality which needs to be written within the Hack Assembly Language. This is a LOT of work for one person!! But it's really fun. :D

                1 Reply Last reply Reply Quote 2
                • vinicity
                  vinicity F last edited by

                  @LucasJG25, would it be Ok to borrow your font for my game?

                  I’ll give you credit, of course!

                  L 1 Reply Last reply Reply Quote 1
                  • L
                    LucasJG25 @vinicity last edited by

                    @vinicity Sure. Happy that it can be of use to the community!

                    1 Reply Last reply Reply Quote 1
                    • vinicity
                      vinicity F last edited by

                      Thanks!
                      I don’t quite grasp the code for setting the pixels in the screen array. Too many bit wise operations!

                      How would I go about changing the code if I want an arbitrary colour for the text, and also a transparent background?

                      1 Reply Last reply Reply Quote 0
                      • L
                        LucasJG25 last edited by

                        @vinicity So the color is managed by the terminal.color variable which uses the first 3 bits of the variable representing 7 colors in total. If you want more colors you'll need to represent fractions in binary which can be done with a few tricks. For getting the pixels to the screen it edits the current index of the screen array.
                        The font size is 4x4 so it uses 16 pixels which are a single bit per pixel. The terminal only uses 1 image to draw stuff to. So managing transparency in the code would mean adjusting the terminal.color variable to take 4 bits instead of 3. So if you wanted black you'll need 1000 in the variable giving you 8. Though it would be much simpler to use the background color for transparency since using {0,0,0,0} would mean leaving behind traces of pixels on the screen from previous frames.

                        As for changing the code. You'd want to focus on functions putchar() which sorts out the mapping of the font to the image including bitmasking the terminal.color variable to the screen array to adjust the color.

                        1 Reply Last reply Reply Quote 1
                        • vinicity
                          vinicity F last edited by

                          Thanks!
                          I’ll give it a shot!

                          1 Reply Last reply Reply Quote 1
                          • vinicity
                            vinicity F last edited by

                            I think I rather butchered your code, but at least I got it working!

                            Thanks for the help!

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post