Coder Social home page Coder Social logo

dcpu_vm's Introduction

Hey! ๐Ÿ‘‹


โœจ I'm a Full-Stack Developer working in Madrid, Spain. I mainly work with Java for backend, and JavaScript (and HTML&CSS/SCSS) for frontend. Sometimes I do other stuff for fun in C, Dlang and other languages.

  • ๐Ÿณ๏ธโ€๐ŸŒˆโ™  My Pronouns: Any
  • ๐Ÿ“ซ How to reach me: https://linktr.ee/fantasmitaasex
  • ๐Ÿ‘ Hobbies : ๐Ÿ”ญ Astronomy, ๐Ÿค– sci-fi, ๐Ÿš‚ trains, ๐Ÿ’พ retrocomputing, playing ๐Ÿ‘พ videogames & ๐ŸŽฒ boardgames, ๐Ÿช„ RPG (D&D mainly)
My GitHub Stats

Top Langs

dcpu_vm's People

Contributors

chemicalrascal avatar lamogui avatar s-ol avatar zardoz89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lamogui fml-0

dcpu_vm's Issues

Mackpar Floppy drive

I did some little test to the implementation of the Floppy drive, and looks that works. I need to improve the test program of it.

Also, I try to use Pixelator with it. It formats, save and load correctly. Something like drawing, going to Disk option, formatting, installing PUS and saving works. Plus If you go back to Draw, and change the image, and then go to Disk option, and try to load the file, it works, restoring the saved image from disk.
But when I reset the machine, or simply exit and load again dcpu-vm, when I "install" PUS filesystem in Pixelator, it erases his own data from the floppy (but not erases the whole disk). I think that is a bug on pixelator, but I'm not very sure about it. Plus it gives a error when I try to save a image (but It saves it!). It's formats, install PUS filesystem correctly, and loads correctly. There is a problem saving, that gets a error at middle of the process, only writing half of the file.

Also, I examined the disk image file with a hex editor, and is the Pixelator data correctly saved.

So the TODO list about the floppy is :

  • Improve the dumb test floppy program. Actually only writes "Cleaning" in screen, and fills the whole floppy with some data that are the last words of the program data. Should to fills the disk with some pattern to test the writing and say "Disk filled" when it finish. Now read it and check that the pattern it's correct and say it when it finish.
  • Implement the Bad Sector bitmap
  • Add pertinent options in main.cpp to load a arbitrary floppy image.

Wrong refresh rendering

Yep, cause : the updatescreen function is not called by tick but by main loop.
Proposition : Monitor have their own sf::Image as member (no need allocation) updateScreen must be an internal function that only update the sf::Image and getScreen function return the sf::Image ptr.

comment bug

In the assembler, the ';' are not parse properly

Reorganization of code

I'm going to structure a bit better like this:

/cmake         <--- Cmake modules
/assets        <--- Image files and similar stuff
/src           <--- Here all .c , .cpp  and .inc files
/src/devices   <--- Here all hardware devices
/src/audio     <--- Here will be placed all code that handles audio 
/include       <--- Here all .h and .hpp files. Mimics /src/... structure
/include/devices
/include/audio

Emulator too fast !

The emulator speed is too fast whatever the emulation mode i use (by time or by frame)
I can see it with the clock.bin program : the second are half of real second.
I don't know if it's my config or other...

The F12 key problem

If i have well understand, the F12 key cause an issue with your terminal shortcuts...
Can we move the key used to another (FXX) to avoid the "System key" that open the start menu on windows...
I put F12 randomly. We can use every anothers keys,

[Compatibility] Allow Monitor to take care of their own texture

In ADDITION of providing sf:Image, i think we can add a sf::Texture to avoid texture.loadFromImage or If in the futur we need it.

  • The AbstractMonitor should have a use_texture flags that enable this.
  • The monitor should only recreate the texture only while it necessary (switch emulation/videos modes)
  • The monitor should update the texture using texture.update(screen) once by render (at the end)

Somes other ideas

  • Replace sf::Image* with sf::Image& (because the sf::Image is no more dynamically allocated)
  • Replace sf::Image* with uint8_t* pointer better compatibility and speed (no slow setPixel function but need to rewrite cgm render)

I wait for discussions...

Key events handling

For what I researched, SFML can't handle some key events, like ! " | @ (Alt gr+number or Shift + number). It isn't a bug, they simple ignored these cases and return a "Unknow key" (-1) value. I send a Issue but looks that is pretty old (first issue two years ago!).

I think that We have this options.

  • Add these codes in SFML code and send a pull request (I can try to do for Windows & Linux, but Mac code it's very different)
  • Bypass SFML and use native code (Similar problem for Mac)
  • Switch to SDL 2 that have a more logical way to handle key events and can grab key codes and scan codes at same time.

What do you think that should try ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.