An 8-bit minicomputer with a fully custom architecture

Related tags

Miscellaneous jdh-8
Overview

JDH-8

An fully custom 8-bit minicomputer with a unique architecture and the express goal of playing PONG.

PONG SCREENSHOT

The program above is running in the emulator, see programs/pong.asm for the source.

See the video on the design.

Machine Description

Features

  • 8-bit data width
  • 16-bit address bus (64 KiB available memory + banking)
  • 8 fully general purpose registers (5 normal + 2 indirect address + 1 flags)
  • 16 instruction RISC architecture
  • Port mapped I/O for device communication

Instruction Set:

0: MW   reg, imm8/reg   -> reg = imm8/reg
1: LW   reg, [HL/imm16] -> reg = [HL/imm16]
2: SW   [HL/imm16], reg -> [HL/imm16] = reg
3: PUSH imm8/reg        -> [SP--] = imm8/reg
4: POP  reg             -> reg = [++SP]
5: LDA  [imm16]         -> HL = imm16
6: JNZ  imm8/reg        -> imm8/reg != 0 ? PC = HL : NOP
7: INB  reg, imm8/reg   -> reg = PORT[imm8/reg]
8: OUTB imm8/reg, reg   -> PORT[imm8/reg] = reg
9: ADD* reg, imm8/reg   -> reg = reg + imm8/reg
A: ADC* reg, imm8/reg   -> reg = reg + imm8/reg + c
B: AND  reg, imm8/reg   -> reg = reg & imm8/reg
C: OR   reg, imm8/reg   -> reg = reg | imm8/reg
D: NOR  reg, imm8/reg   -> reg = ~(reg | imm8/reg)
E: CMP* reg, imm8/reg   -> reg = reg + imm8/reg
F: SBB* reg, imm8/reg   -> reg = reg - imm8/reg - b

*these instructions load the carry/borrow bits in the (F)lags register

Registers

A (0): GP register/arg 0
B (1): GP register/arg 1
C (2): GP register/arg 2
D (3): GP register/arg 3
L (4): GP register/(L)ow index register
H (5): GP register/(H)igh index register
Z (6): GP register/return value
F (7): flags (LSB to MSB)
    LESS
    EQUAL
    CARRY
    BORROW

See the spec for more information.

Toolchain

Compile with make

Please note that this software requires POSIX headers/compliance from the host system.
Good luck compiling on Windows.

Assembler (asm)

./bin/asm [-h] [--help] [-v] [--verbose] [-n] [--no-builtin-macros] [-o file] file

Emulator (emu)

./bin/emu [-m/--mod module] [-r/--run] [-l/--load file address] [ROM file]

Commands

  • SET <register> <data>: set register data
  • GET <register>: get register value
  • PEEK <address>: get memory value
  • POKE <address> <data>: set memory data
  • INB <port>: get port data
  • OUTB <port> <data>: write port data
  • STEP: step one instruction
  • DUMP: print current machine state
  • LOAD <ROM file> <address>: load ROM at address
  • MODS: list modules
  • MOD <module>: load module
  • DEVICES: list devices
  • RUN <speed?>: run at speed (hz) until halt
  • QUIT: quit
Comments
  • Does not compile on arch linux

    Does not compile on arch linux

    So I did the following:

    git clone https://github.com/jdah/jdh-8.git
    cd jdh-8
    make
    

    And I get the following error:

    mkdir -p bin
    clang -o emu/emu.o -c emu/emu.c -std=c11 -O0 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments
    emu/emu.c:21:34: warning: implicit declaration of function 'fileno' is invalid in C99 [-Wimplicit-function-declaration]
        struct pollfd pfds = { .fd = fileno(stdin), .events = POLLIN };
                                     ^
    emu/emu.c:35:14: warning: implicit declaration of function 'strcasecmp' is invalid in C99 [-Wimplicit-function-declaration]
            if (!strcasecmp(speed, "realtime")) {
                 ^
    emu/emu.c:99:5: warning: implicit declaration of function 'strlcpy' is invalid in C99 [-Wimplicit-function-declaration]
        strlcpy(str, text, sizeof(str));
        ^
    emu/emu.c:170:19: warning: implicit declaration of function 'fmemopen' is invalid in C99 [-Wimplicit-function-declaration]
            FILE *f = fmemopen((void *) out, n, "wb");
                      ^
    emu/emu.c:170:15: warning: incompatible integer to pointer conversion initializing 'FILE *' (aka 'struct _IO_FILE *') with an expression of type 'int' [-Wint-conversion]
            FILE *f = fmemopen((void *) out, n, "wb");
                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5 warnings generated.
    clang -o emu/kb.o -c emu/kb.c -std=c11 -O0 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments
    In file included from emu/kb.c:1:
    In file included from emu/emu.h:4:
    emu/../common/util.h:39:9: error: unknown type name 'ssize_t'; did you mean 'size_t'?
    typedef ssize_t isize;
            ^~~~~~~
            size_t
    /usr/lib/clang/12.0.1/include/stddef.h:46:23: note: 'size_t' declared here
    typedef __SIZE_TYPE__ size_t;
    
    1 error generated.
    make: *** [Makefile:57: emu/kb.o] Error 1
    
    opened by chitramdasgupta 19
  • Does not compile on Windows

    Does not compile on Windows

    On windows, using make that comes with mingw-w64 (i think), the compilation fails with error 'unistd.h' file not found

    Windows 10 make version 4.3 Clang version 11.0.0

    EDIT :: Apparently my clang toolchain was incorrect, but now I'm missing poll.h instead of unistd.h

    opened by Kylogias 15
  • Question about implementing jdh-8 support into TRSE

    Question about implementing jdh-8 support into TRSE

    Hi there! First of all, thanks for this wonderful project! Really amazing stuff.

    Second, check out TRSE (www.turborascal.com), my modern IDE + pascal compiler + resource management solution for 65(c)02/Z80/X86/Motorola 68000 computers. Some yt videos:

    • https://www.youtube.com/watch?v=9CtHHOtgvKU
    • https://www.youtube.com/watch?v=_oPfTd_MlNA

    or check out my youtube channel (https://www.youtube.com/c/leuat79) or https://lemonspawn.com/gallery_/ for a list of showcases

    So the actual question: Would you be OK if I (just for fun) went ahead added support for your CPU + computer into TRSE? Since my compiler is modular/easily extendable, adding support for your CPU should be a piece of cake - even better since you've already providing code for mul16 and div etc etc (I'm used to the 6502 and z80). In that case, a user would be able to rapidly start a new project for your system -> type a couple of lines of Pascal -> press Ctlr+R ->program gets executed automatically in your emulator. If you're wondering how this would look, then download TRSE and check out how I've added support for 15-20ish old computers and their respective emulators + have over 400 tutorials / sample projects.

    Reason why I wanted to do this: your code is clean. emulator readily available, no hassle with start addresses, assembler included, compiles out of the box. I have my own 6502/z80 assembler, and could easily create my own for your CPU - but since you already provide an assembler.. I'm lazy =)

    btw I also made my own "fake" computer, though emulator only - which uses a 6502 + SID - check out a demo on the computer here: https://www.youtube.com/watch?v=BqIxwTUWUh0.

    regards

    Nicolaas

    opened by leuat 11
  • Make windows compilation successful

    Make windows compilation successful

    NOTE :: This lays the groundwork for windows compilation to be successful but it doesn't ensure that the compiled code will run properly. This PR also cleans up some code to make MinGW-W64 throw less errors and to make time measurements more exact (1024*1024 for megahertz instead of 1000000). Should close #1

    opened by Kylogias 8
  • SDL bug? or did I miss something?

    SDL bug? or did I miss something?

    What a wonderful project!

    compiled, assembled pong/holiday, but nothing shows up on screen. Did I miss anything on how you're supposed to load an run programs?

    Screenshot 2021-12-27 at 19 17 21

    all I get is a blank screen, sometimes an error about writing to 0x0000. PC correctly at 0c000 and step correctly iterates through the code.

    opened by leuat 7
  • How do I run programs?

    How do I run programs?

    So I read through the README.md file and I tried everything I can to run a program I know how to get the screen running now but I have no idea how to run the demo.asm program I used the asm assembly executable and typed ./bin/asm programs/demo.asm demo then I loaded the output then ran the output with the command run 2 and it was blank also I ran the asm output because I thought the asm compiler was for compiling the programs and convert them into roms but it didn't work I also tried a few commands to make it work they didn't work either please help

    opened by hdfsyu 7
  • Error compiling on Windows

    Error compiling on Windows

    ok now WHY do I get so many errors on WSL I use clang and some more stuff and when I type "make" this happens:

    mkdir -p bin clang -o emu/libemu.o -c emu/libemu.c -std=c11 -O0 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments emu/libemu.c:39:17: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration] u64 start = NOW(), ^ emu/libemu.c:9:17: note: expanded from macro 'NOW' assert(!clock_gettime(_CLOCK_MONOTONIC_RAW, &ts));
    ^ emu/libemu.c:39:17: error: use of undeclared identifier '_CLOCK_MONOTONIC_RAW' emu/libemu.c:9:31: note: expanded from macro 'NOW' assert(!clock_gettime(_CLOCK_MONOTONIC_RAW, &ts));
    ^ emu/libemu.c:45:15: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration] now = NOW(); ^ emu/libemu.c:9:17: note: expanded from macro 'NOW' assert(!clock_gettime(_CLOCK_MONOTONIC_RAW, &ts));
    ^ emu/libemu.c:45:15: error: use of undeclared identifier '_CLOCK_MONOTONIC_RAW' emu/libemu.c:9:31: note: expanded from macro 'NOW' assert(!clock_gettime(_CLOCK_MONOTONIC_RAW, &ts));
    ^ emu/libemu.c:76:41: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration] u64 sleep_time = ns_per_step - (NOW() - now); ^ emu/libemu.c:9:17: note: expanded from macro 'NOW' assert(!clock_gettime(_CLOCK_MONOTONIC_RAW, &ts));
    ^ emu/libemu.c:76:41: error: use of undeclared identifier '_CLOCK_MONOTONIC_RAW' emu/libemu.c:9:31: note: expanded from macro 'NOW' assert(!clock_gettime(_CLOCK_MONOTONIC_RAW, &ts));
    ^ emu/libemu.c:80:9: warning: implicit declaration of function 'nanosleep' is invalid in C99 [-Wimplicit-function-declaration] SLEEP(sleep_time); ^ emu/libemu.c:19:13: note: expanded from macro 'SLEEP' nanosleep(&req, &rem);
    ^ 4 warnings and 3 errors generated. make: *** [Makefile:38: emu/libemu.o] Error 1 yeahhhhhhhhhhhhhhh can u help?

    opened by hdfsyu 7
  • Cannot build on a fresh Ubuntu VM

    Cannot build on a fresh Ubuntu VM

    I used a fresh Ubuntu VM, with nothing but GCC, make, perl, VirtualBox Guest Additions, and clang installed.

    After having to rename ssize_t to size_t, and installing libreadline-dev, I ran into this:

    image

    I have little experience writing/compiling C, so I'm pretty much stuck. What do I need to do to get it built?

    opened by CountBleck 4
  • Read/write attempt for non-present bank 0x0001

    Read/write attempt for non-present bank 0x0001

    I compile by running ./bin/asm programs/pong.asm and it gives me a out.bin file. I emulate it by running ./bin/emu out.bin and then typing >RUN. But it keeps saying Read/write attempt for non-present bank 0x0001 infinitely

    opened by Nemesis300 3
  • Minor circuit reconfigurations

    Minor circuit reconfigurations

    Closed unnecessary ports on splitters, applied some wire savings and added some miscellaneous visual simplifications. I'm certain the changes shouldn't cause any unexpected behaviour and the circuit should work perfectly.

    Logisim's custom HDL (or any HDL for that matter) isn't exactly easy to analyse at first glance so I'll just add some before and after images of my PR to not complicate things.

    BEFORE:

    1. https://cdn.discordapp.com/attachments/816669196565741629/881958499498741780/unknown.png
    2. https://cdn.discordapp.com/attachments/816669196565741629/881958725689155624/unknown.png
    3. https://cdn.discordapp.com/attachments/816669196565741629/881960593668579358/unknown.png

    AFTER:

    1. https://cdn.discordapp.com/attachments/816669196565741629/881958263539793930/unknown.png
    2. https://cdn.discordapp.com/attachments/816669196565741629/881958774619930714/unknown.png
    3. https://cdn.discordapp.com/attachments/816669196565741629/881959271405858816/unknown.png

    btw, I absolutely love your videos. Good luck with building the rest of the components for your custom computer :)

    opened by Existential-Kernel 2
  • Possible memory leak

    Possible memory leak

    There is a possible memory leak in the load function of emu/libemu.c where the file may be bigger than 32K (the size of ROM) or even 64K (the size of the entire memory). This can leave to corrupted data when, for example, the screen is reading from memory, or another process modifies memory, or even the PROGRAM ITSELF modifies memory as it'll have an unknown size when assembled, thus you may read into/from memory that has program code

    opened by Kylogias 2
  • SDL blank window

    SDL blank window

    I compiled both demo.asm and ostext.asm, and I used this command to load them into the emulator: ./bin/emu -l demo 0xC000 -l ostext 0 -m kb -m screen -r realtime

    However, the SDL window is blank: image

    You can see the output of the terminal, the files are being correctly loaded and there are no errors. I'm not sure what's causing this, I just built with make, and I had all dependencies installed (at least make did not throw any error).

    opened by AnErrupTion 0
  • [WSL2] strstr assertion fails due to \n and \r\n file encoding

    [WSL2] strstr assertion fails due to \n and \r\n file encoding

    Expected behaviour

    The following assertion should work on a Windows file format: test/test.c:78 --

    assert(strstr(str, "; TEST\n") == str);
    

    Current behaviour

    The assertion fails because \n != \r\n on Windows file formats, which include a carriage return.

    Possible solution

    Add check for carriage return using the 'or' operator, such as:

    assert(strstr(str, "; TEST\n") == str || strstr(str, "; TEST\r\n") == str);
    

    Steps to reproduce

    1. Clone repo into a Windows directory
    2. Build on WSL
    3. Execute $ ./bin/test
    4. Assertion fails

    Host OS: Windows 10 Pro x86_64 21H2 19044.1706 Guest OS: WSL2 Ubuntu 20.04 x86_64 Guest kernel: 5.10.16.3-microsoft-standard-WSL2

    opened by McMaartenz 0
  • emu/libemu.c:12:21: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)

    emu/libemu.c:12:21: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)

    What does this mean for undeclared in...

    if not exist bin mkdir bin
    gcc -o emu/emu.o -c emu/emu.c -std=c11 -O2 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -IC:/msys64/mingw64/include/ -v -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments
    Using built-in specs.
    COLLECT_GCC=gcc
    Target: mingw32
    Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
    Thread model: win32
    gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
    COLLECT_GCC_OPTIONS='-o' 'emu/emu.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
     c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/cc1.exe -quiet -v -I C:/msys64/mingw64/include/ -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/ emu/emu.c -quiet -dumpbase emu.c -mtune=generic -march=i586 -auxbase-strip emu/emu.o -g -O2 -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments -std=c11 -version -o C:\Users\Home\AppData\Local\Temp\ccZNDe1F.s
    GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
            compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    ignoring nonexistent directory "c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include"
    ignoring duplicate directory "/mingw/lib/gcc/mingw32/6.3.0/../../../../include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include-fixed"
    ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
    ignoring duplicate directory "/mingw/include"
    #include "..." search starts here:
    #include <...> search starts here:
     C:/msys64/mingw64/include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include-fixed
    End of search list.
    GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
            compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    Compiler executable checksum: 384cad586f05ed581a9c068b2f18b408
    In file included from emu/emu.h:4:0,
                     from emu/emu.c:16:
    emu/../common/util.h: In function 'strtou32':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:178:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u32, u32, 0, UINT_MAX)
     ^~~~~~~~~~~~
    emu/../common/util.h: In function 'strtou16':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:180:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u16, u16, 0, USHRT_MAX)
     ^~~~~~~~~~~~
    emu/../common/util.h: In function 'strtou8':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:182:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u8, u8, 0, INT_MAX)
     ^~~~~~~~~~~~
    emu/emu.c: In function 'stop_simulation':
    emu/emu.c:21:34: warning: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
         struct pollfd pfds = { .fd = fileno(stdin), .events = POLLIN };
                                      ^~~~~~
    emu/emu.c: In function 'run':
    emu/emu.c:35:14: warning: implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]
             if (!strcasecmp(speed, "realtime")) {
                  ^~~~~~~~~~
    emu/emu.c: At top level:
    cc1.exe: warning: unrecognized command line option '-Wno-gnu-zero-variadic-macro-arguments'
    COLLECT_GCC_OPTIONS='-o' 'emu/emu.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
     c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/as.exe -v -I C:/msys64/mingw64/include/ -o emu/emu.o C:\Users\Home\AppData\Local\Temp\ccZNDe1F.s
    GNU assembler version 2.28 (mingw32) using BFD version (GNU Binutils) 2.28
    COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/
    LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/6.3.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../
    COLLECT_GCC_OPTIONS='-o' 'emu/emu.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
    gcc -o emu/kb.o -c emu/kb.c -std=c11 -O2 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -IC:/msys64/mingw64/include/ -v -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments
    Using built-in specs.
    COLLECT_GCC=gcc
    Target: mingw32
    Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
    Thread model: win32
    gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
    COLLECT_GCC_OPTIONS='-o' 'emu/kb.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
     c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/cc1.exe -quiet -v -I C:/msys64/mingw64/include/ -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/ emu/kb.c -quiet -dumpbase kb.c -mtune=generic -march=i586 -auxbase-strip emu/kb.o -g -O2 -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments -std=c11 -version -o C:\Users\Home\AppData\Local\Temp\ccom65Wj.s
    GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
            compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    ignoring nonexistent directory "c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include"
    ignoring duplicate directory "/mingw/lib/gcc/mingw32/6.3.0/../../../../include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include-fixed"
    ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
    ignoring duplicate directory "/mingw/include"
    #include "..." search starts here:
    #include <...> search starts here:
     C:/msys64/mingw64/include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include-fixed
    End of search list.
    GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
            compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    Compiler executable checksum: 384cad586f05ed581a9c068b2f18b408
    In file included from emu/emu.h:4:0,
                     from emu/kb.c:1:
    emu/../common/util.h: In function 'strtou32':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:178:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u32, u32, 0, UINT_MAX)
     ^~~~~~~~~~~~
    emu/../common/util.h: In function 'strtou16':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:180:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u16, u16, 0, USHRT_MAX)
     ^~~~~~~~~~~~
    emu/../common/util.h: In function 'strtou8':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:182:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u8, u8, 0, INT_MAX)
     ^~~~~~~~~~~~
    emu/kb.c: At top level:
    cc1.exe: warning: unrecognized command line option '-Wno-gnu-zero-variadic-macro-arguments'
    COLLECT_GCC_OPTIONS='-o' 'emu/kb.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
     c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/as.exe -v -I C:/msys64/mingw64/include/ -o emu/kb.o C:\Users\Home\AppData\Local\Temp\ccom65Wj.s
    GNU assembler version 2.28 (mingw32) using BFD version (GNU Binutils) 2.28
    COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/
    LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/6.3.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../
    COLLECT_GCC_OPTIONS='-o' 'emu/kb.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
    gcc -o emu/libemu.o -c emu/libemu.c -std=c11 -O2 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -IC:/msys64/mingw64/include/ -v -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments
    Using built-in specs.
    COLLECT_GCC=gcc
    Target: mingw32
    Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
    Thread model: win32
    gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
    COLLECT_GCC_OPTIONS='-o' 'emu/libemu.o' '-c' '-std=c11' '-O2' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/msys64/mingw64/include/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-Wno-gnu-zero-variadic-macro-arguments' '-mtune=generic' '-march=i586'
     c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/cc1.exe -quiet -v -I C:/msys64/mingw64/include/ -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/ emu/libemu.c -quiet -dumpbase libemu.c -mtune=generic -march=i586 -auxbase-strip emu/libemu.o -g -O2 -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments -std=c11 -version -o C:\Users\Home\AppData\Local\Temp\ccWeaztj.s
    GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
            compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    ignoring nonexistent directory "c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include"
    ignoring duplicate directory "/mingw/lib/gcc/mingw32/6.3.0/../../../../include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
    ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include-fixed"
    ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
    ignoring duplicate directory "/mingw/include"
    #include "..." search starts here:
    #include <...> search starts here:
     C:/msys64/mingw64/include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../include
     c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include-fixed
    End of search list.
    GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
            compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    Compiler executable checksum: 384cad586f05ed581a9c068b2f18b408
    In file included from emu/emu.h:4:0,
                     from emu/libemu.c:7:
    emu/../common/util.h: In function 'strtou32':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:178:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u32, u32, 0, UINT_MAX)
     ^~~~~~~~~~~~
    emu/../common/util.h: In function 'strtou16':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:180:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u16, u16, 0, USHRT_MAX)
     ^~~~~~~~~~~~
    emu/../common/util.h: In function 'strtou8':
    emu/../common/util.h:170:22: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
             } else if (r >= (_min) && r <= (_max)) {                    \
                          ^
    emu/../common/util.h:182:1: note: in expansion of macro '_DECL_STRTOX'
     _DECL_STRTOX(u, u8, u8, 0, INT_MAX)
     ^~~~~~~~~~~~
    emu/libemu.c: In function 'simulate':
    emu/libemu.c:21:17: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
             assert(!clock_gettime(MONO_CLOCK, &ts));            \
                     ^
    emu/../common/util.h:211:31: note: in definition of macro 'assert'
     #define assert(_e) ( _assert((_e), false, __FILE__, __LINE__))
                                   ^~
    emu/libemu.c:51:17: note: in expansion of macro 'NOW'
         u64 start = NOW(),
                     ^~~
    emu/libemu.c:12:21: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
      #define MONO_CLOCK CLOCK_MONOTONIC
                         ^
    emu/../common/util.h:211:31: note: in definition of macro 'assert'
     #define assert(_e) ( _assert((_e), false, __FILE__, __LINE__))
                                   ^~
    emu/libemu.c:21:31: note: in expansion of macro 'MONO_CLOCK'
             assert(!clock_gettime(MONO_CLOCK, &ts));            \
                                   ^~~~~~~~~~
    emu/libemu.c:51:17: note: in expansion of macro 'NOW'
         u64 start = NOW(),
                     ^~~
    emu/libemu.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
      #define MONO_CLOCK CLOCK_MONOTONIC
                         ^
    emu/../common/util.h:211:31: note: in definition of macro 'assert'
     #define assert(_e) ( _assert((_e), false, __FILE__, __LINE__))
                                   ^~
    emu/libemu.c:21:31: note: in expansion of macro 'MONO_CLOCK'
             assert(!clock_gettime(MONO_CLOCK, &ts));            \
                                   ^~~~~~~~~~
    emu/libemu.c:51:17: note: in expansion of macro 'NOW'
         u64 start = NOW(),
                     ^~~
    emu/libemu.c:32:43: warning: statement with no effect [-Wunused-value]
                 ((rem.tv_sec * NS_PER_SECOND) + rem.tv_nsec);   \
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    emu/libemu.c:92:9: note: in expansion of macro 'SLEEP'
             SLEEP(sleep_time);
             ^~~~~
    emu/libemu.c:33:18: warning: statement with no effect [-Wunused-value]
             } else { 0; }                                       \
                      ^
    emu/libemu.c:92:9: note: in expansion of macro 'SLEEP'
             SLEEP(sleep_time);
             ^~~~~
    emu/libemu.c: In function 'pop16':
    emu/libemu.c:209:29: warning: operation on 'state->special.<U9c00>.pc' may be undefined [-Wsequence-point]
             (((u16) peek(state, ++state->special.pc)) << 0) |
                                 ^~~~~~~~~~~~~~~~~~~
    emu/libemu.c: In function 'step':
    emu/libemu.c:332:42: warning: operation on 'state->special.<U9c00>.pc' may be undefined [-Wsequence-point]
         (((u16) peek(state, state->special.pc++)) << 8))\
                             ~~~~~~~~~~~~~~~~~^
    emu/libemu.c:341:51: note: in expansion of macro 'IMM16'
                     pc0 & 0x8 ? state->registers.hl : IMM16()
                                                       ^~~~~
    emu/libemu.c:332:42: warning: operation on 'state->special.<U9c00>.pc' may be undefined [-Wsequence-point]
         (((u16) peek(state, state->special.pc++)) << 8))\
                             ~~~~~~~~~~~~~~~~~^
    emu/libemu.c:347:51: note: in expansion of macro 'IMM16'
                     pc0 & 0x8 ? state->registers.hl : IMM16(),
                                                       ^~~~~
    emu/libemu.c:331:41: warning: operation on 'state->special.<U9c00>.pc' may be undefined [-Wsequence-point]
         ((u16) peek(state, state->special.pc++)) |      \
                            ~~~~~~~~~~~~~~~~~^
    emu/libemu.c:358:18: note: in expansion of macro 'IMM16'
                 hl = IMM16();
                      ^~~~~
    emu/libemu.c: At top level:
    cc1.exe: warning: unrecognized command line option '-Wno-gnu-zero-variadic-macro-arguments'
    make: *** [emu/libemu.o] Error 1
    
    opened by Glenry 2
  • Error trying to compile in Ubuntu 20.04 using WSL

    Error trying to compile in Ubuntu 20.04 using WSL

    Ok so when I was trying to compile the code I ran into this error Error: emu/emu.c:12:14: fatal error: 'readline/readline.h' file not found #include <readline/readline.h> It's kind of obvious the file is missing or not found(said in the error) But where is this file located because it was the only error I got. Here is the full Makefile logs V (my user and pc)~/jdh-8$ make mkdir -p bin clang -o emu/kb.o -c emu/kb.c -std=c11 -O2 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments clang -o emu/emu.o -c emu/emu.c -std=c11 -O2 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -Wno-gnu-zero-variadic-macro-arguments emu/emu.c:12:14: fatal error: 'readline/readline.h' file not found #include <readline/readline.h> ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [Makefile:77: emu/emu.o] Error 1

    So where can I find this readline.h file. Just to clarify I am using WSL Ubuntu 20.04. By the way this was the only error I have encountered so far.

    opened by Jaantheman 2
  • Compiler errors, no executeable on windows

    Compiler errors, no executeable on windows

    I cloned the repo today and started compiling on windows. i use MSYS2-MinGW64 and followed the instructions in the readme. but i get some syntax errors. The full log

    mkdir -p bin
    gcc -o emu/libemu.o -c emu/libemu.c -std=c11 -O0 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -IC:/Users/Robin/AppData/Local/MSYS2/mingw64/include/ -IC:/Users/Robin/AppData/Local/MSYS2/usr/lib/ -v -Wno-pointer-arith -Wno-unused-parameter
    Using built-in specs.
    COLLECT_GCC=gcc
    Target: x86_64-pc-msys
    Configured with: /c/_/S/gcc/src/gcc-10.2.0/configure --build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-arch=x86-64 --with-tune=generic --disable-multilib --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --disable-libssp --disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as --disable-isl-version-check --enable-checking=release --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
    Thread model: posix
    Supported LTO compression algorithms: zlib
    gcc version 10.2.0 (GCC)
    COLLECT_GCC_OPTIONS='-o' 'emu/libemu.o' '-c' '-std=c11' '-O0' '-g' '-Wall' '-Wextra' '-Wpedantic' '-Wstrict-aliasing' '-I' 'C:/Users/Robin/AppData/Local/MSYS2/mingw64/include/' '-I' 'C:/Users/Robin/AppData/Local/MSYS2/usr/lib/' '-v' '-Wno-pointer-arith' '-Wno-unused-parameter' '-mtune=generic' '-march=x86-64'
     /usr/lib/gcc/x86_64-pc-msys/10.2.0/cc1.exe -quiet -v -I C:/Users/Robin/AppData/Local/MSYS2/mingw64/include/ -I C:/Users/Robin/AppData/Local/MSYS2/usr/lib/ -idirafter /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../lib/../include/w32api -idirafter /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/lib/../lib/../../include/w32api emu/libemu.c -quiet -dumpbase libemu.c -mtune=generic -march=x86-64 -auxbase-strip emu/libemu.o -g -O0 -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-unused-parameter -std=c11 -version -o /tmp/ccTKThYJ.s
    GNU C11 (GCC) version 10.2.0 (x86_64-pc-msys)
            compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version isl-0.22.1-GMP
    
    warning: GMP header version 6.2.0 differs from library version 6.2.1.
    warning: MPC header version 1.1.0 differs from library version 1.2.1.
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    ignoring nonexistent directory "/usr/local/include"
    ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/include"
    ignoring duplicate directory "/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/lib/../lib/../../include/w32api"
    #include "..." search starts here:
    #include <...> search starts here:
     C:/Users/Robin/AppData/Local/MSYS2/mingw64/include/
     C:/Users/Robin/AppData/Local/MSYS2/usr/lib/
     /usr/lib/gcc/x86_64-pc-msys/10.2.0/include
     /usr/lib/gcc/x86_64-pc-msys/10.2.0/include-fixed
     /usr/include
     /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../lib/../include/w32api
    End of search list.
    GNU C11 (GCC) version 10.2.0 (x86_64-pc-msys)
            compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version isl-0.22.1-GMP
    
    warning: GMP header version 6.2.0 differs from library version 6.2.1.
    warning: MPC header version 1.1.0 differs from library version 1.2.1.
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    Compiler executable checksum: 5dc831ba8ba50cc9f8b7e3207bc4f700
    In file included from emu/../common/util.h:6,
                     from emu/emu.h:4,
                     from emu/libemu.c:3:
    emu/../common/util.h: In function ‘strlstrip’:
    emu/../common/util.h:88:20: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       88 |     while (isspace(*str)) memmove(str, str + 1, --len);
          |                    ^~~~
    emu/../common/util.h: In function ‘strrstrip’:
    emu/../common/util.h:95:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       95 |     while (isspace(str[len - 1])) str[--len] = '\0';
          |                    ~~~^~~~~~~~~
    In file included from emu/emu.h:4,
                     from emu/libemu.c:3:
    emu/../common/util.h: In function ‘strtou32’:
    emu/../common/util.h:134:22: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
      134 |         } else if (r >= (_min) && r <= (_max)) {                    \
          |                      ^~
    emu/../common/util.h:142:1: note: in expansion of macro ‘_DECL_STRTOX’
      142 | _DECL_STRTOX(u, u32, u32, 0, UINT_MAX)
          | ^~~~~~~~~~~~
    emu/../common/util.h: In function ‘strtou16’:
    emu/../common/util.h:134:22: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
      134 |         } else if (r >= (_min) && r <= (_max)) {                    \
          |                      ^~
    emu/../common/util.h:144:1: note: in expansion of macro ‘_DECL_STRTOX’
      144 | _DECL_STRTOX(u, u16, u16, 0, USHRT_MAX)
          | ^~~~~~~~~~~~
    emu/../common/util.h: In function ‘strtou8’:
    emu/../common/util.h:134:22: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
      134 |         } else if (r >= (_min) && r <= (_max)) {                    \
          |                      ^~
    emu/../common/util.h:146:1: note: in expansion of macro ‘_DECL_STRTOX’
      146 | _DECL_STRTOX(u, u8, u8, 0, INT_MAX)
          | ^~~~~~~~~~~~
    emu/libemu.c: In function ‘simulate’:
    emu/libemu.c:10:21: error: ‘_CLOCK_MONOTONIC_RAW’ undeclared (first use in this function); did you mean ‘CLOCK_MONOTONIC’?
       10 |  #define MONO_CLOCK _CLOCK_MONOTONIC_RAW
          |                     ^~~~~~~~~~~~~~~~~~~~
    emu/../common/util.h:175:31: note: in definition of macro ‘assert’
      175 | #define assert(_e) ( _assert((_e), false, __FILE__, __LINE__))
          |                               ^~
    emu/libemu.c:15:31: note: in expansion of macro ‘MONO_CLOCK’
       15 |         assert(!clock_gettime(MONO_CLOCK, &ts));            \
          |                               ^~~~~~~~~~
    emu/libemu.c:45:17: note: in expansion of macro ‘NOW’
       45 |     u64 start = NOW(),
          |                 ^~~
    emu/libemu.c:10:21: note: each undeclared identifier is reported only once for each function it appears in
       10 |  #define MONO_CLOCK _CLOCK_MONOTONIC_RAW
          |                     ^~~~~~~~~~~~~~~~~~~~
    emu/../common/util.h:175:31: note: in definition of macro ‘assert’
      175 | #define assert(_e) ( _assert((_e), false, __FILE__, __LINE__))
          |                               ^~
    emu/libemu.c:15:31: note: in expansion of macro ‘MONO_CLOCK’
       15 |         assert(!clock_gettime(MONO_CLOCK, &ts));            \
          |                               ^~~~~~~~~~
    emu/libemu.c:45:17: note: in expansion of macro ‘NOW’
       45 |     u64 start = NOW(),
          |                 ^~~
    emu/libemu.c:26:43: warning: statement with no effect [-Wunused-value]
       26 |             ((rem.tv_sec * NS_PER_SECOND) + rem.tv_nsec);   \
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    emu/libemu.c:86:9: note: in expansion of macro ‘SLEEP’
       86 |         SLEEP(sleep_time);
          |         ^~~~~
    emu/libemu.c:27:18: warning: statement with no effect [-Wunused-value]
       27 |         } else { 0; }                                       \
          |                  ^
    emu/libemu.c:86:9: note: in expansion of macro ‘SLEEP’
       86 |         SLEEP(sleep_time);
          |         ^~~~~
    emu/libemu.c: In function ‘pop16’:
    emu/libemu.c:203:29: warning: operation on ‘state->special.<U43b0>.pc’ may be undefined [-Wsequence-point]
      203 |         (((u16) peek(state, ++state->special.pc)) << 0) |
          |                             ^~~~~~~~~~~~~~~~~~~
    emu/libemu.c: In function ‘step’:
    emu/libemu.c:320:42: warning: operation on ‘state->special.<U43b0>.pc’ may be undefined [-Wsequence-point]
      320 |     (((u16) peek(state, state->special.pc++)) << 8))\
          |                         ~~~~~~~~~~~~~~~~~^~
    emu/libemu.c:329:51: note: in expansion of macro ‘IMM16’
      329 |                 pc0 & 0x8 ? state->registers.hl : IMM16()
          |                                                   ^~~~~
    emu/libemu.c:320:42: warning: operation on ‘state->special.<U43b0>.pc’ may be undefined [-Wsequence-point]
      320 |     (((u16) peek(state, state->special.pc++)) << 8))\
          |                         ~~~~~~~~~~~~~~~~~^~
    emu/libemu.c:335:51: note: in expansion of macro ‘IMM16’
      335 |                 pc0 & 0x8 ? state->registers.hl : IMM16(),
          |                                                   ^~~~~
    emu/libemu.c:319:41: warning: operation on ‘state->special.<U43b0>.pc’ may be undefined [-Wsequence-point]
      319 |     ((u16) peek(state, state->special.pc++)) |      \
          |                        ~~~~~~~~~~~~~~~~~^~
    emu/libemu.c:346:18: note: in expansion of macro ‘IMM16’
      346 |             hl = IMM16();
          |                  ^~~~~
    emu/libemu.c:377:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
      377 |                     r += !!(state->registers.f & (1 << F_CARRY));
          |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    emu/libemu.c:378:17: note: here
      378 |                 case I_ADD:
          |                 ^~~~
    make: *** [Makefile:57: emu/libemu.o] Error 1
    

    What should i do?

    opened by thegame4craft 16
Owner
jdh
jdh
A video input (V4L2) to NDI converter that works with Raspberry Pi (32-bit and 64-bit), and Intel/AMD CPUs

V4L2 to NDI V4L2 to NDI is an application that connects to attached V4L2 devices and encodes the video signal into NDI It uses the NDI library, allowi

Luke Plassman 40 Jul 28, 2022
The purpose of these streams is to be educational and entertaining for viewers to learn about systems architecture, reverse engineering, software security, etc., and NOT to encourage nor endorse malicious game hacking.

Memestream This repository holds the code that I develop during my live game "modding" ?? sessions. When I stream, I like to speedrun making a success

Stephen Tong 28 Jul 6, 2022
FastPath_MP: An FPGA-based multi-path architecture for direct access from FPGA to NVMe SSD

FastPath_MP Description This repository stores the source code of FastPath_MP, an FPGA-based multi-path architecture for direct access from FPGA to NV

Beehive lab 21 Sep 12, 2022
Khepri is a Cross-platform agent, the architecture and usage like Coblat Strike but free and open-source.

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Young 1.4k Sep 20, 2022
Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++, the architecture and usage like Cobalt Strike

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Young 1.4k Sep 20, 2022
Project #1: Run-length Encoding (Computer Architecture, Fall 2021)

4190.308 Computer Architecture (Fall 2021) Project #1: Run-length Encoding Due: 11:59PM, September 26 (Sunday) Introduction In this project, you need

SNU Systems Software & Architecture Laboratory 5 Sep 16, 2022
Project #2: FP10 Representation (Computer Architecture, Fall 2021)

4190.308 Computer Architecture (Fall 2021) Project #2: FP10 (10-bit Floating Point) Representation Due: 11:59PM, October 17 (Sunday) Introduction The

SNU Systems Software & Architecture Laboratory 3 Oct 14, 2021
Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework, based on QEMU.

Unicorn Engine Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework, based on QEMU. Unicorn offers some unparalleled fe

lazymio 1 Nov 7, 2021
Decentralized architecture for loss tolerant semi-autonomous robotics

gestalt-arch Decentralized architecture for loss tolerant semi-autonomous robotics Objective We demonstrate a decentralized robot control architecture

null 4 Dec 18, 2021
Protobuf for Proxyman app - Include Apple Silicon & Intel architecture

Protobuf for Proxyman macOS app Protobuf for Proxyman app - Include Apple Silicon & Intel architecture How to build Open the project on the latest Xco

Proxyman 6 Nov 29, 2021
Satellite Flight Software: Command-Centric Architecture

Core of Command Centric Architecture C2A Command Centric Architecture OBC 搭載フライトソフトウェアフレームワーク C2A core 各 C2A で共通利用される C2A の中核部のコード 基本的には,各々の C2A user

Intelligent Space Systems Laboratory, The University of Tokyo 33 Sep 14, 2022
Following Automotive Open System Architecture (AUTOSAR)

Following Automotive Open System Architecture (AUTOSAR), Diagnostic Communication Manager Module Implemented over Communication Stack Based on AUTOSAR Specification Document (SWS) Release 4.3.1 Classic Platform, ISO-14229 Standard (Road Vehicle Unified Diagnostic Services (UDS)) and ISO-15765 (Road Vehicle Diagnostics on Controller Area Network (CAN)).

null 8 Aug 31, 2022
It's a simple and free x86_64 architecture operating system created by one person, GoofOS started since 2022

This project is while developing... GoofOS GoofOS is a text operating system for x86 computers. About This is a 32 bit x86_64 graphical operating syst

null 3 May 1, 2022
a playground for working with fully static tensors and automatic differentiation

This is a playground for learning about how to apply template-meta-programming to get more efficient evaluation for tensor-based automatic differentiation.

Edward Kmett 16 Mar 18, 2021
SMARTmBOT - a new, customizable, scalable, and fully opensource mobile robot platform

The goal of this repository is to introduce a new, customizable, scalable, and fully opensource mobile robot platform, called SMARTmBOT. This repository provides a guide, and all design files and source codes so that you can build your own SMARTmBOT. SMARTmBOT can be useful for studying the basics of robotics, especially mobile robotics. It can also be used to study advanced topics such as swarm robotics.

SMART Lab at Purdue University 35 Sep 17, 2022
A proposition for a fully intergrated kext for all Surface Pro hardwares

BigSurface The name comes from macOS Big Sur. Big Sur + Surface -> Big Surface (LOL) PS:If you have a better name, please let me know. A proposition f

null 99 Sep 16, 2022
Fully Featured Time Circuits Display from Back to the Future

Time Circuits Display This Time Circuits Display has been meticulously reproduced to be as accurate as possible to the one seen in the Delorean Time M

John 57 Sep 15, 2022
A loadlibrary injector for the game Splitgate that fully bypasses their EQU8 anti-cheat implementation.

splitgate-load-library-injector A loadlibrary injector for the game Splitgate that fully bypasses their EQU8 anti-cheat implementation. Information Th

Hinnie 7 Apr 18, 2022
Fully resizing juce peak meter module with optional fader overlay.

Sound Meter Juce peak meter module with optional fader overlay. by Marcel Huibers | Sound Development 2021 | Published under the MIT License Features:

Sound Development 16 Sep 16, 2022