Philip Smart 1931719e80 [DOC] Document how to run binaries and where to place ROMs.
Add a "How to run" section to README.en.md explaining that emulators read
ROMs from ~/CommonSourceCodeProject/emu<machine>/ (created on first launch),
not from the binary's directory — the cause of the common "window opens but
nothing happens" symptom. Covers the config/save dir, that ROMs are not
shipped and are case-sensitive, points at doc/VMs/<machine>.txt for the
per-machine filename list, and gives an FM-7 worked example. Add a short
matching note to BUILD-NOTES.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:43:50 +01:00
2023-02-02 00:24:28 +09:00
2020-12-16 00:53:29 +09:00
2020-10-08 04:53:12 +09:00

** Qt porting for Common Source Code Project **

Feb 10, 2018
K.Ohta

If you can read Japanese, japanese(日本語) writing is here.

About

This package is Qt5 porting of Common Source Code Project (CSP).

Building with GNU/Linux(64bit) and MinGW(32bit Windows).

Source code

https://github.com/Artanejp/common_source_project-fm7/

Additional infomations

You can get pre-compiled binaries from osdn.net and their mirrors.

https://osdn.net/projects/csp-qt/

https://osdn.net/projects/csp-qt/releases/

LICENSE

GPL Version 2.

Background

Common Source Code Project (CSP) is good emulator writing.

But codes are specified to M$ Visual C.

I'm using GNU/Linux, and I starting to apply FM-7(or later).

So, I start to port to GNU/Linux and using Qt4.

Note:

You can build with MinGW32 and Qt 5.5.1(for MinGW).

TIPS:

  • If emufoo.exe don't show screen drawing, set environment variable QT_OPENGL to software (i.e. Using Windows as VirtualBox's gueat OS).

What you need at least:

  • Qt5 (neither Qt3 and Qt4) toolkit, including OpenGL and Network modules.

  • Some OpenGL implementation, maybe at leaset OpenGL v3.0 .

  • A C++20-capable toolchain: gcc / g++ (10 or later) or llvm clang / clang++ (10 or later). (Some VMs, e.g. FMTOWNS, now require C++20.)

  • SDL2 (not SDL1.x).

  • FFmpeg / libav development libraries (avcodec, avformat, avutil, avfilter, avdevice, swscale, swresample) — used for the movie save/load feature.

  • zlib.

  • CMake 3.9 or later.

How to build:

Note (updated): the old per-machine build-cmake/{Machine name}/ layout no longer exists. There is now a single build directory under source/ that builds every machine target at once. A full step-by-step recipe with the exact Debian 12 package names is in BUILD-NOTES.md.

After extracting (or git pulled) sourcecodes:

$ cd {srctop}/source
$ mkdir build
$ cd build

To configure (enable C++20 — required by some VMs such as FMTOWNS):

$ cmake -DCSP_BUILD_WITH_CXX20=ON ..

or, for an interactive configuration:

$ ccmake -DCSP_BUILD_WITH_CXX20=ON ..

To build (all targets; resulting emu<machine> binaries are written to the build dir):

$ make -j$(nproc)

To install:

$ sudo make install

How to run (and where to put ROMs):

Each target builds to an executable named emu<machine> (e.g. emufm7, emumz700, emufmtowns) in the build directory. You can run it directly without installing.

Important: the emulators do not load ROMs from the directory the binary sits in. On first launch each binary creates its own data directory and reads ROMs from there. If the required ROMs are missing the window opens but the machine stays blank — this is the usual "nothing happens" symptom.

  1. Run the binary once to create its directories:

    $ ./emufm7
    

    This creates (on GNU/Linux):

    • ROM / data dir: ~/CommonSourceCodeProject/emu<machine>/
    • Config / save-state dir: ~/.config/CommonSourceCodeProject/emu<machine>/

    (On Windows these live next to the executable, under .\CommonSourceCodeProject\emu<machine>\.)

  2. Copy the ROM files for that machine into ~/CommonSourceCodeProject/emu<machine>/.

    • ROMs are not included for copyright reasons — you must supply your own.
    • Filenames are case-sensitive on GNU/Linux and must match exactly.
    • The required filenames for every machine are listed in doc/VMs/<machine>.txt. For example doc/VMs/fm7.txt lists BOOT_BAS.ROM, FBASIC.ROM, SUBSYS_C.ROM, etc.; doc/VMs/mz700.txt lists IPL.ROM, FONT.ROM, and so on.
  3. Restart the binary. It should now boot the machine.

  4. Load media (floppy, tape, cartridge, ...) from the application menus (Control / the device menus). Disk/tape images are remembered in the config dir between runs.

Worked example (FM-7):

$ ./emufm7                    # first run -> creates the data dir, blank screen
$ cd ~/CommonSourceCodeProject/emufm7/
# copy BOOT_BAS.ROM, FBASIC.ROM, SUBSYS_C.ROM (and optionally KANJI.ROM) here
$ cd -                        # back to the build dir
$ ./emufm7                    # now boots F-BASIC

See doc/VMs/ for the per-machine ROM list and key mappings, and BUILD-NOTES.md for build setup.

Qt specified notice :

  • Config file (scancode.cfg and foo.ini) has placed (moved) to "~/.config/CommonSourceCodeProject/emufoo/" (for Windows, ".\CommonSourceCodeProject\emudfoo" ).

  • BIOS, WAVS, BINS and SAVED STATES have placed (moved) to "~/CommonSourceCodeProject/emufoo/" (for Windows, ".\CommonSourceCodeProject\emudfoo" ).

  • All of recorded products (PNG Screenshots, MOVIES, SOUNDS) have temporally written to "~/.config/CommonSourceCodeProject/emufoo/" (for Windows, ".\CommonSourceCodeProject\emudfoo" ).

  • Added ToolTips.(2017-01-24)

  • Translated menu entries to Japanese.(2017-01-24)

  • Place R@Ms under $HOME/CommonSourceCodeProject/emu{Machine Name}/ , this directory has made after first using.

  • Key code conversion file is written on $HOME/.config/CommonSourceCodeProject/emu{Machine Name}/scancode.cfg .

    ** This file contains comma separated fields, written at hex-decimal (not decimal),

    ** First is M$ Virtual Key Code,

    ** Second is Qt's scan code.

  • Common components (i.e. source/src/qt/gui ) are packed to DLLs/shared libs.

  • Bash script for installation is available: source/src/tool/installer_unix.sh .

  • When you place some WAV files to directry same as R@M, you can some sounds; i.e. FDD's seek.See doc/VMs/*.txt .

  • ROMAJI-KANA conversion assitance feature has implemented to some VMs.

Status

  • I tested to build only under Debian GNU/Linux "sid".But, perhaps, will succed to build another GNU/Linux OSs or BSD OS variants.

    ** On windows, using MinGW is already okay.

    ** Cross building with GNU/Linux's MinGW32 and Qt5.5.1 (for MinGW) is available.

    ** Modify and use build-cmake/config_build_cross_win32.sh and related *.cmake files.

    ** And, you can also build with M$ Visual Studio 2013 or 2015.

  • Now, I using Qt5 as toolkit, because authors of Qt announced "Qt4 is obsolete, will be updated no longer".

  • All of virtual machines of upstream (@Dec 17, 2015) are already ported to Qt.

  • Now using GCC-7.x with Link Time Optimize to build for distrubuted binaries.

  • Implemented MZ-2500's socket, but, still not test enough(;´Д`)

Repositry:

https://github.com/Artanejp/common_source_project-fm7

https://osdn.net/projects/csp-qt/scm/git/common_source_project-fm7

Project Page:

https://osdn.jp/projects/csp-qt/

Upstream (Takeda Toshiya San's original code)

http://takeda-toshiya.my.coocan.jp/

Special thanks to:

Ryu Takegami : Assist to debug and give informations about eFM-8/7/77/AV/40/EX .

Have fun!

--- Ohta.

© 2018 Toshiya Takeda

© 2018 K.Ohta <whatisthis.sowhat at gmail.com>

Description
Mirror of Artanejp/common_source_project-fm7 (CSP/Qt multi-machine emulator) with build fixes for FFmpeg 5.1 + C++20/GCC12. Reference for picoZ80.
Readme 54 MiB
Languages
C++ 72.2%
C 23.6%
MAXScript 1.4%
CMake 0.9%
Shell 0.8%
Other 0.8%