Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

- [coco] Fix bug in fuji_set_appkey_details that overwrote the first byte of data of a project that includes fujinet-lib
- [coco] Remove unneccesary makefile block for mac - make runs fine on mac
- [coco] Removed legacy -D_CMOC_VERSION_=1 CFLAG, which floods output with "macro redefined" warnings. CMOC already defines this.
- [build] Guarded hex_dump.c with flag `FN_LIB_DEBUG` which can be enabled via `application.mk`.
Added additional docs to `README.md` to explain this.
Added comments to top of `build.mk` to explain a little bit about paths that are included.
Expand Down
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
# Set the TARGETS and PROGRAM values as required.
# See makefiles/build.mk for details on directory structure for src files and how to add custom extensions to the build.

# Require GNU Make 4.0 or later for $(file ...) function
ifeq ($(filter 4.%,$(MAKE_VERSION)),)
$(error This Makefile requires GNU Make 4.0 or later. You are using $(MAKE_VERSION). Please use 'gmake' instead of 'make' on macOS.)
endif

TARGETS = adam apple2 apple2enh atari c64 coco msdos
PROGRAM := fujinet.lib

Expand Down
7 changes: 5 additions & 2 deletions common/src/fn_fuji/fuji_set_appkey_details.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

extern uint16_t ak_creator_id;
extern uint8_t ak_app_id;
extern enum AppKeySize ak_appkey_size;

// IMPORTANT: Instead of "enum AppKeySize", explicitly matching the underlying uint8_t data type, othwerise
// CMOC will write a 16 bit enum value at the location, overflowing into the next byte, causing corruption
extern uint8_t ak_appkey_size;

void fuji_set_appkey_details(uint16_t creator_id, uint8_t app_id, enum AppKeySize keysize)
{
ak_appkey_size = keysize;
ak_appkey_size = (uint8_t)keysize;
ak_app_id = app_id;
ak_creator_id = creator_id;
}
2 changes: 1 addition & 1 deletion makefiles/compiler-cmoc.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CC := cmoc
AR := lwar
CFLAGS := -O2 -D_CMOC_VERSION_=1
CFLAGS := -O2

INCC_ARG := -I
INCS_ARG := -I