Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Projets de programmation


Index du Forum » Projets de programmation » MQ : Émulateur add-ins universel
Lephenixnoir Hors ligne Cuties gang Points: 26006 Défis: 174 Message

MQ : Émulateur add-ins universel

Posté le 28/05/2025 20:22

Parmi les projets de 2025 il y a tout un plan pour préserver les contenus du site, notamment les vieux programmes. La base de programmes de Planète Casio n'est pas beaucoup maintenue et on ne traque pas vraiment ce qui est encore jouable ou pas.

Les projets d'émulateurs c'est pas nouveau, c.f. *, *, * et j'en oublie. Initialement je pensais repartir d'un existant, mais finalement j'en ai commencé un from scratch en voyant le cahier des charges :

  • Il faut pouvoir émuler à la fois les Graph mono et les Prizm et à la fois les SH3 et les SH4 ;
  • Il faut que ça puisse tourner sur le site donc compiler vers WebAssembly et optimiser raisonnablement (téléphones etc. ont pas des perfs de dingue) ;
  • Il faut émuler pas mal de trucs matériels, donc assez bas-niveau, pour bien couvrir les add-ins et potentiellement l'appli PRGM pour émuler les programmes Basic ;
  • Et si on fait tout ça ce serait criminel de pas s'en servir pour développer/debugger, ce pour quoi une GUI plus grosse que juste l'écran est nécessaire (et/ou gdb).

Les détails techniques, pour ceux que ça intéresse, c'est : pur C, tourne sur Azur par facilité (GUI en OpenGL avec ImGui + compile pour Linux et WebAssembly), le décodeur est un arbre de switch généré automatiquement et la mémoire est hiérarchique par blocs de 1 Mo, 4 ko, et 1 octet.

L'état actuel (Mai 2025) c'est : on peut faire tourner quelques add-ins sur CG, y'a des syscalls mais peu, y'a une partie du matériel émulé pour faire tourner gint ; en gros si vous prenez un add-in aléatoire ça va probablement pas marcher, mais pas loin.

Voici le dépôt et au passage à quoi ressemble l'interface : y'a tous les trucs techniques nécessaires pour debugger.

» Dépôt Git Lephenixnoir/mq «

» Instance Web (expérimentale) «


J'ai pas encore de build pour le web sur lequel vous pouvez cliquer et tester tout de suite, mais vous pouvez compiler depuis le dépôt.

Voilà plus de nouvelles bientôt j'espère.

Fichier joint


Lephenixnoir Hors ligne Cuties gang Points: 26006 Défis: 174 Message

Citer : Posté le 09/04/2026 21:14 | #


We intend to have such features in the future, but for now there's just a default fx-9860G II for mono (although the G-III screen is recognized) and an fx-CG 50 for the Prizms.
Mon graphe (28 Juin): (MPM ; v5 ; Azur ; passe gint 3 ; ...) || Rogue Life
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 18/08/2026 17:57 | #


I'm having a bit of trouble trying to run MQ on my Windows machine. I downloaded the web version but the addin hung, so I tried to install Azur. To do that, I downloaded and installed Emscripten, but all the Azur download commands fail (probably because I'm not using a Unix shell). What's the way to install/use MQ on Windows? Thanks. (The end goal is to take screenshots of my PythonExtra projects.)
Lephenixnoir Hors ligne Cuties gang Points: 26006 Défis: 174 Message

Citer : Posté le 22/08/2026 17:20 | #


Oh, that'll take a slight detour.

- Web version, the add-in hung: can you still reproduce it? Please show me what add-in, what hung it, so we can debug it.

- Installing Azur doesn't require emscripten, only if you're going to build the web version (but no point it's already available).

- There's no Windows build currenty :/ mostly because neither I nor Yatis work on it. I haven't use Windows in like 10 years. You can use WSL to get a Linux environment and then build Azur and MQ as if on Linux. There you can run PythonExtra and take all the screenshots you want.
Mon graphe (28 Juin): (MPM ; v5 ; Azur ; passe gint 3 ; ...) || Rogue Life
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 23/08/2026 20:05 | #


7amithorn a écrit :
web version

I just realized that could have been much clearer; I meant for the downloaded web (html) version. I boot index.html, the little loading bar pops up, and... nothing. Page is stuck on that.
In addition to that, in the web web version, I can't find how to upload .py files to run them, per:
Mb88 a écrit :
To run scripts in pythonextra, put them in mq's parent directory, and you should see them in the file chooser when you start pythonextra.

Hope that's clearer.

I should really just find a way to use Microsoft 365 in linux, that's the only thing that's keeping me off of Mint...
Lephenixnoir Hors ligne Cuties gang Points: 26006 Défis: 174 Message

Citer : Posté le 23/08/2026 22:18 | #


Oooh you can't just download it. I wished you could, but sadly browsers treat file:// and remote servers differently. For security you can do much less in file://, which includes notably the thread support MQ needs. If you really wanted to run it locally, you'd have to use the Python script provided in the repo, which runs a local web server with the right setup to convince the browser. See here. There's no benefit compared to https://www.planet-casio.com/mq/index.html though.

Which brings me to, yes, the web version doesn't support uploading files, which is stupid but is a missing feature >_>"

Hence why running the Linux version is a good fallback, the Linux version will load files from the current working directory directly.
Mon graphe (28 Juin): (MPM ; v5 ; Azur ; passe gint 3 ; ...) || Rogue Life
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 16/10/2026 06:39 | #


So I finally installed WSL and have it running, but tbh I'm completely lost on how to get mq built and running (never compiled a file, ever). Can anyone give a step-by-step on how to install it? For reference, my current environment is as it comes out of the box, i.e. should be clean, plus only nautilus, gedit, and cmake (with gcc15, I think...) and dependencies.
Thanks so much...
Lephenixnoir Hors ligne Cuties gang Points: 26006 Défis: 174 Message

Citer : Posté le 16/10/2026 09:23 | #


Ok, it's not the easiest thing to build if you're not used to it. You'll have to first follow the instructions for Azur and then you can build MQ.

So, should be something like this. Clone Azur and get there:

git clone --recursive https://git.planet-casio.com/Lephenixnoir/Azur

cd Azur

Then build it:

export AZUR_PATH_linux="$HOME/.local"

cmake -B build-linux-3rdparty -S 3rdparty \
  -DAZUR_PLATFORM=linux \
  -DCMAKE_INSTALL_PREFIX="$AZUR_PATH_linux"

make -C build-linux-3rdparty install -j$(nproc)

cmake -B build-linux \
  -DAZUR_PLATFORM=linux \
  -DCMAKE_INSTALL_PREFIX="$AZUR_PATH_linux"

make -C build-linux install -j$(nproc)

Then same shtick with MQ :

cd ..

git clone --recursive https://git.planet-casio.com/Lephenixnoir/mq

cd mq

cmake -B build-linux -DAZUR_PLATFORM=linux -DCMAKE_BUILD_TYPE=Release

make -C build-linux

And then run it as build-linux/mq.

As you can see I made the cd commands explicit. You should usually by comfortable dealing with that yourself. Most projects' instructions will omit cd and git clone but will otherwise be copy-paste grade.
Mon graphe (28 Juin): (MPM ; v5 ; Azur ; passe gint 3 ; ...) || Rogue Life
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 05:38 | #


Upon trying to run the first cmake command, I get this error:

CMake Error at /usr/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
  Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:654 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-4.2/Modules/FindPkgConfig.cmake:562 (find_package_handle_standard_args)
  CMakeLists.txt:34 (find_package)

note: to get this far, I had to also install g++, which was probably a unsaid given I missed
cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 06:28 | #


7amithorn, you're most likely missing 'pkg-config and build-essential' dependency.
Install them via your package manager in WSL and rerun the build.
It may cover g++ dependency that you bungled into though.

GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 06:41 | #


done... and now it's complaining that there's no package named "glx"
maybe this is a WSL problem?
cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 06:45 | #


Nope, still dependencies. Install these: libglx-dev libgl-dev libgl1-mesa-dev,
then verify that pkg-config sees them with: (and build afterwards)

pkg-config --modversion glx


GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 07:12 | #


Well, I got further, up to the second cmake, and it looks like another .cmake file is missing: so is freetype but I highly doubt that's an issue
(full error)
from the cl:
CMake Error at CMakeLists.txt:34 (find_package):
  By not providing "FindAzur3rdParty.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Azur3rdParty", but CMake did not find one.

  Could not find a package configuration file provided by "Azur3rdParty"
  (requested version 0.3) with any of the following names:

    Azur3rdPartyConfig.cmake
    azur3rdparty-config.cmake

  Add the installation prefix of "Azur3rdParty" to CMAKE_PREFIX_PATH or set
  "Azur3rdParty_DIR" to a directory containing one of the above files.  If
  "Azur3rdParty" provides a separate development package or SDK, be sure it
  has been installed.

Thanks for all the help so far.
cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 07:21 | #


Try these, Azur has dependencies that are only on its git, not in any package manager.
From repo:

git submodule update --init --recursive

export AZUR_PATH_linux="$HOME/.local"

cmake -S 3rdparty -B build-linux-3rdparty \
  -DAZUR_PLATFORM=linux \
  -DCMAKE_INSTALL_PREFIX="$AZUR_PATH_linux"

cmake --build build-linux-3rdparty -j$(nproc)

cmake --install build-linux-3rdparty

:'
then reconfigure:
'
cmake -S . -B build-linux \
  -DAZUR_PLATFORM=linux \
  -DCMAKE_PREFIX_PATH="$HOME/.local"


GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 07:38 | #


Still no dice, looks like libavcodec is missing:
(full shell, again)
wooooo
[  8%] Compiling ffmpeg and its dependencies...
<ffmpeg> Configuring x264 ===================================
[ 33%] Built target gl3w
[100%] Built target imgui
Found no assembler
Minimum version is nasm-2.13
If you really want to compile without asm, configure with --disable-asm.
gmake[2]: *** [CMakeFiles/ffmpeg.dir/build.make:77: ffmpeg-prefix/lib/libavcodec.a] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/ffmpeg.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
s7amithorn@Floorlap:~/Azur$ cmake --install build-linux-3rdparty
-- Install configuration: ""
CMake Error at build-linux-3rdparty/cmake_install.cmake:78 (file):
  file INSTALL cannot find
  "/home/s7amithorn/Azur/build-linux-3rdparty/ffmpeg-prefix/lib/libavcodec.a":
  No such file or directory.

Another dependency to install?
cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 07:40 | #


Unfortunately, I think this is included in the package manager.
I don't know what is your distro but now you need nasm.

Edit: then rebuild from azur w/

cmake --build build-linux-3rdparty -j$(nproc)

:'
if it did build, install it
'
cmake --install build-linux-3rdparty


GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 07:58 | #


Made it to the second cmake, and then...
CMake Error at azur/CMakeLists.txt:132 (target_link_libraries):
  Target "azur" links to:

    Azur::gl3w

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.


edit: distro is Ubuntu 26.04.1 LTS
cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 08:15 | #


well, good news we got azur found, but were closer than it looks
from azur folder:
If the error persists dump grep and find here.

find "$HOME/.local" \
  \( -iname '*gl3w*' -o -iname '*Azur3rdParty*' \)

grep -Rni 'Azur::gl3w' \
  "$HOME/.local/lib/cmake" 2>/dev/null

==============================================
:'
Make sure this build is good
'
cmake --build build-linux-3rdparty -j$(nproc)
cmake --install build-linux-3rdparty

:'
Retry..
'

cmake -S . -B build-linux \
  -DAZUR_PLATFORM=linux \
  -DCMAKE_PREFIX_PATH="$HOME/.local"


GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 08:20 | #


Find:
/home/s7amithorn/.local/share/Trash/files/mq/3rdparty/tracy/cmake/gl3w-extra-symbols.patch
/home/s7amithorn/.local/include/azur/3rdparty/gl3w
/home/s7amithorn/.local/include/azur/3rdparty/gl3w/GL/gl3w.h
/home/s7amithorn/.local/lib/azur/libgl3w.a
/home/s7amithorn/.local/lib/cmake/FindAzur3rdParty.cmake

Grep:
/home/s7amithorn/.local/lib/cmake/FindAzur3rdParty.cmake:39:  add_library(Azur::gl3w STATIC IMPORTED)
/home/s7amithorn/.local/lib/cmake/FindAzur3rdParty.cmake:41:  set_target_properties(Azur::gl3w PROPERTIES
/home/s7amithorn/.local/lib/cmake/FindAzur3rdParty.cmake:49:    target_link_libraries(Azur::gl3w INTERFACE PkgConfig::glx -ldl)
/home/s7amithorn/.local/lib/cmake/FindAzur3rdParty.cmake:50:    list(APPEND AZUR_DEFAULT_3RDPARTY_LIBS Azur::gl3w)

cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 08:23 | #


gl3w is installed indeed. theres a sort of typo I think so send me this sed
output and we'll change something

sed -n '25,55p' "$HOME/.local/lib/cmake/FindAzur3rdParty.cmake"


GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/
7amithorn Hors ligne Membre Points: 65 Défis: 0 Message

Citer : Posté le 17/10/2026 08:26 | #


full code
Cliquez pour recouvrir
# Output: libraries that Azur should link to (some are default when present).
set(AZUR_DEFAULT_3RDPARTY_LIBS)

if(AZUR_PLATFORM STREQUAL linux)
find_package(PkgConfig REQUIRED)
endif()

#=== gl3w =====================================================================#

set(AZUR_INCLUDE_GL3W "${AZUR_INCLUDE_3RDPARTY}/gl3w")
set(AZUR_LIB_GL3W "${AZUR_LIB}/libgl3w.a")

if(EXISTS "${AZUR_INCLUDE_GL3W}" AND EXISTS "${AZUR_LIB_GL3W}")
message("(Azur) Found gl3w at: ${AZUR_LIB_GL3W}")
add_library(Azur::gl3w STATIC IMPORTED)

set_target_properties(Azur::gl3w PROPERTIES
IMPORTED_LOCATION "${AZUR_LIB_GL3W}"
INTERFACE_INCLUDE_DIRECTORIES "${AZUR_INCLUDE_GL3W}"
SYSTEM FALSE)

if(AZUR_PLATFORM STREQUAL linux)
message("(Azur/gl3w) Getting glx from pkg-config (required)")
pkg_check_modules(glx REQUIRED glx IMPORTED_TARGET)
target_link_libraries(Azur::gl3w INTERFACE PkgConfig::glx -ldl)
list(APPEND AZUR_DEFAULT_3RDPARTY_LIBS Azur::gl3w)
endif()
endif()

#=== Dear ImGui ===============================================================#

cacioandpepe Hors ligne Membre Points: 35 Défis: 0 Message

Citer : Posté le 17/10/2026 08:28 | #


open a notepad or use nano to open
~/.local/lib/cmake/FindAzur3rdParty.cmake. and find this:
set(AZUR_LIB_GL3W) "${AZUR_LIB}/libgl3w.a")
and change the malfunction to this
set(AZUR_LIB_GL3W "${AZUR_LIB}/libgl3w.a")

then rebuild:

cmake -S . -B build-linux \
  -DAZUR_PLATFORM=linux \
  -DCMAKE_PREFIX_PATH="$HOME/.local"


GPG : F747 7C61 CC79 5021 E060 6117 1E55 9E70 DF46 E38B
My formula for greatness in a human being is amor fati: that one wants nothing to be different, not forward, not backward, not in all eternity. ----- Friederich Nietzsche (Ecce Homo)
https://cacioandpepe.ca/

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

→ ⇒ √ Σ ∫ ≠ ≥ ≤ π θ ◢ ± α β γ δ Δ σ ≈ ∞ ∈ λ
captcha

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2026 | Il y a 128 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd