MakeAPPL is now obsolete, as everything it does can be done by Rez

This commit is contained in:
Wolfgang Thaller 2015-07-20 20:05:38 +02:00
parent 4957426613
commit f1c4fe3a22
6 changed files with 116 additions and 12 deletions

View File

@ -54,3 +54,26 @@ resource 'DITL' (128) {
RadioButton { enabled, "Radio 2" };
}
};
#include "Processes.r"
resource 'SIZE' (-1) {
dontSaveScreen,
acceptSuspendResumeEvents,
enableOptionSwitch,
canBackground,
multiFinderAware,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
reserved,
reserved,
reserved,
reserved,
reserved,
reserved,
reserved,
100 * 1024,
100 * 1024
};

View File

@ -1,13 +1,7 @@
#include "Retro68.r"
type 'INIT' {
hex string dontBreakAtEntry = $"", breakAtEntry = $"A9FF";
longint = 0x61000002; // bsr *+2
relativeTo:
integer = 0x0697; // addi.l #_, (a7)
longint = $$long(fltfile + 8*8) + (fltfile-relativeTo)/8;
integer = 0x4e75; // rts
longint = fltfile/8;
fltfile:
hex string;
RETRO68_CODE_TYPE
};
resource 'INIT' (128) {

View File

@ -8,6 +8,7 @@ function(add_application name)
set(options DEBUGBREAK CONSOLE)
set(oneValueArgs TYPE CREATOR)
set(multiValueArgs FILES MAKEAPPL_ARGS)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
list(APPEND ARGS_FILES ${ARGS_UNPARSED_ARGUMENTS})
@ -45,9 +46,15 @@ function(add_application name)
endif()
foreach(f ${rsrc_files})
list(APPEND ARGS_MAKEAPPL_ARGS --copy "${f}")
list(APPEND ARGS_MAKEAPPL_ARGS "${f}")
endforeach()
if(NOT ARGS_TYPE)
set(ARGS_TYPE "APPL")
endif()
if(NOT ARGS_CREATOR)
set(ARGS_CREATOR "????")
endif()
if(TARGET libretro)
@ -58,7 +65,13 @@ function(add_application name)
add_custom_command(
OUTPUT ${name}.bin ${name}.APPL ${name}.dsk
COMMAND ${MAKE_APPL} ${ARGS_MAKEAPPL_ARGS} -c "${name}.flt" -o "${name}"
#COMMAND ${MAKE_APPL} ${ARGS_MAKEAPPL_ARGS} -c "${name}.flt" -o "${name}"
COMMAND ${REZ} ${CMAKE_SOURCE_DIR}/libretro/Retro68APPL.r
-I${REZ_INCLUDE_PATH}
-DFLT_FILE_NAME="\\"${name}.flt\\""
-o "${name}.bin" --cc "${name}.dsk" --cc "${name}.APPL"
-t ${ARGS_TYPE} -c ${ARGS_CREATOR}
${ARGS_MAKEAPPL_ARGS}
DEPENDS ${name} ${rsrc_files})
add_custom_target(${name}_APPL ALL DEPENDS ${name}.bin)
endfunction()

View File

@ -30,7 +30,11 @@ add_library(retrocrt
malloc.c
syscalls.c
glue.c
consolehooks.c)
consolehooks.c
Retro68.r
Retro68APPL.r
)
install(TARGETS retrocrt DESTINATION lib)
install(FILES Retro68Runtime.h DESTINATION include)
install(FILES Retro68.r Retro68APPL.r DESTINATION RIncludes)

41
libretro/Retro68.r Normal file
View File

@ -0,0 +1,41 @@
type 'CODE' (0) {
longint; // size above A5
longint; // size of application globals
longint = (jtend - jtstart) / 8; // size of jump table
longint; // a5 offset of jump tabe
jtstart:
array {
integer; // offset
integer = 0x3f3c;
integer; // segment
integer = 0xa9f0;
};
jtend:
;
};
#define RETRO68_CODE_TYPE \
hex string dontBreakAtEntry = $"", breakAtEntry = $"A9FF"; \
longint = 0x61000002; /* bsr *+2 */ \
relativeTo: \
integer = 0x0697; /* addi.l #_, (a7) */ \
longint = $$long(fltfile + 8*8) + (fltfile-relativeTo)/8; \
integer = 0x4e75; /* rts */ \
longint = fltfile/8; \
fltfile: \
hex string;
type 'CODE' (1) {
integer = 0;
integer = 1;
RETRO68_CODE_TYPE
};
#define RETRO68_JUMP_TABLE { \
0x28, 0, 0x20, \
{ \
0, 1; \
}; \
}

29
libretro/Retro68APPL.r Normal file
View File

@ -0,0 +1,29 @@
#include "Processes.r"
#include "Retro68.r"
resource 'CODE' (0) RETRO68_JUMP_TABLE;
resource 'CODE' (1) {
dontBreakAtEntry, $$read(FLT_FILE_NAME);
};
resource 'SIZE' (-1) {
dontSaveScreen,
acceptSuspendResumeEvents,
enableOptionSwitch,
canBackground,
multiFinderAware,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
reserved,
reserved,
reserved,
reserved,
reserved,
reserved,
reserved,
1024 * 1024,
1024 * 1024
};