Repository navigation
Conversation
Rework of the tidied Makefile: - objects go to obj/ (objhtml/ for PLAT=HTML) instead of the source tree - .c files are compiled with CC and .cpp files with CXX -std=c++11, which removes the 'treating c input as c++' and C++11 extension warnings - restore the scr/ preload and SDL flags for the Emscripten build - add a test_z80emu object so 'make tests/zxtest' works again - keep -Wall -pedantic (no -Wextra, which adds ~940 unused-parameter warnings in the vendored CPU cores) - make the z80core opcode format strings const char * and give Z80CORE_Create a prototype Warnings on a clean macOS build drop from 1433 to 16.
'make test' runs the suite and fails if fewer than the known 286 tests pass (the z80emu core currently stops at cb46, an undocumented flags case that depends on MEMPTR).
sdl2-config adds .../include/SDL2 to the include path, so <SDL2/SDL.h> was not found.
Build on Ubuntu and macOS against SDL 1.2 and SDL2, build the z80emu core as well as z80core, and run 'make test'. Update the README badge and add build instructions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #18 (thanks @cospplredman, credited in the first commit). Fixes #3. Fixes #5.
What changed
CPU/SDL/PLAT/DEBUG, z80emu helpers (maketables,zextest) moved tosrc/cpu/z80emu/util/.obj/(not the source tree),.cis compiled as C and.cppas C++11, Emscripten flags/preloads restored,make tests/zxtestworks again.-Wextrafrom Issue#3 Tidy up Makefile #18 left out since it adds ~940 unused-parameter warnings in the vendored cores.const char *opcode format strings in z80core, prototype forZ80CORE_Create(void).-Wnested-anon-typesinZ80Core.h).make SDL=2fixed (#include <SDL.h>;sdl2-configalready adds the SDL2 dir).make test:cputestnow exits non-zero on failure; the target fails if fewer than 286 tests pass. The z80emu core currently stops atcb46(BIT 0,(HL) undocumented flags 3/5, from MEMPTR, which z80emu doesn't model), so that's the baseline used to catch regressions..travis.ymlreplaced with.github/workflows/build.yml(Ubuntu + macOS, SDL 1.2 + SDL2, builds the z80core and z80emu cores, runsmake test). README badge and build instructions updated.Tested locally (macOS arm64)
make,make SDL=2,make SDL=0,make DEBUG=1,make CPU=z80emuall build clean./zxemboots the 48K ROM with SDL 1.2 and SDL2make test: 286 passed, known stop at cb46Not covered
util/zextest.cdoesn't build against this repo's callback-based z80emu (FLAG_STOP_EMULATIONetc. are gone), so it isn't in CI.PLAT=HTMLnot tested (no Emscripten here).