Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
47ed26b
Update the Cocoa Speech Synthesizer wrapper to work with the new chan…
MaddTheSane Jan 11, 2018
021fa4b
hunt down a few instances of non-standard ({...}) macros (gcc extension)
autc04 Jan 11, 2018
5030948
fix check_structs warnings
autc04 Jan 13, 2018
e07fd7d
PERSONALITY_HACK to i386, on x86_64-linux it just causes check_struct…
autc04 Jan 13, 2018
c7692a0
unbreak ({...}) hunt (commit 021fa4b57a691057747e00dcf2c3fa66ab8fcd84)
autc04 Jan 13, 2018
b49ae08
qt let qt handle the modifier keys
autc04 Jan 13, 2018
cb9b80b
rootless support for DragGrayRgn
autc04 Jan 13, 2018
a6853c8
rootless: fix popup menus and beautify dragging
autc04 Jan 13, 2018
251c076
remove HOOKSAVEREGS/HOOKRESTOREREGS() macros (they were no-ops)
autc04 Jan 13, 2018
efef411
start overhauling PascalTrap templates
autc04 Jan 14, 2018
0466a98
improve annotations for selector-based traps in header files
autc04 Jan 14, 2018
a99419c
remove special-case stub for GetResource (the implementation of GetRe…
autc04 Jan 14, 2018
060978e
fix some PASCAL_FUNCTION annotations
autc04 Jan 14, 2018
a29d17f
move away from manually-maintained pstuff array
autc04 Jan 14, 2018
b999866
delete pstuff.h
autc04 Jan 14, 2018
b723c94
Hunt down direct calls to CToPascalCall (involves making some functio…
autc04 Jan 14, 2018
f5f5c81
improve function management templates
autc04 Jan 14, 2018
2f7ac62
windRootless: do not pass pointer to native heap as parameter to Rec…
autc04 Jan 15, 2018
962fecd
qPicStuf: use NewPtr to allocate memory that needs to be accessed fro…
autc04 Jan 15, 2018
4703d01
tooltraptable is now generated from new templates; short-circuiting i…
autc04 Jan 15, 2018
929ec8a
add missing trap numbers to emustubs.h
autc04 Jan 15, 2018
0c33486
Start logging parameters to standard output
autc04 Jan 16, 2018
d372f5e
logging progress
autc04 Jan 19, 2018
77f9555
register calling convention draft
autc04 Jan 19, 2018
3d64a0d
reorder source files for compilation parallelism
autc04 Jan 19, 2018
871e7ce
DragTheRegion: only do rootless window stuff if thePort == WMgrPort
autc04 Jan 19, 2018
34d5acd
function wrapper for NewPtr
autc04 Jan 19, 2018
4be7c8f
silence valgrind warning
autc04 Jan 19, 2018
fb5584b
Yes, a0 is really the argument to Delay. (answer a question posed in…
autc04 Jan 21, 2018
689c715
dont clobber OS trap #0 (_Open) when no trap is specified
autc04 Jan 21, 2018
2ba0dc9
experimentally switch NewPtr to new macros/templates
autc04 Jan 22, 2018
8c16e99
adjust some function names to match Apple documentation
autc04 Jan 22, 2018
22eda90
annotate all subtraps with selectors in header files; make dclaration…
autc04 Jan 22, 2018
d8df006
for the record: script used to annotate subtraps in header files
autc04 Jan 23, 2018
c51edf2
Revert "experimentally switch NewPtr to new macros/templates"
autc04 Jan 23, 2018
20d3fce
declare DISPATCHER_TRAP macro, simplify initialization
autc04 Jan 23, 2018
7bbaa38
update script for annotating PASCAL_SUBTRAP to output DISPATCHER_TRAP…
autc04 Jan 23, 2018
02ca667
declare dispatcher traps
autc04 Jan 23, 2018
de5c1a6
_PrGlue -> PrGlue
autc04 Jan 23, 2018
b48fe24
another refactoring of functions.cpp initialization
autc04 Jan 24, 2018
b5cf3b7
define callconv::ReturnMemErr, callconv::CCFromD0
autc04 Jan 24, 2018
3925921
missing DISPATCHER_TRAPs
autc04 Jan 24, 2018
435dafb
trap dispatchers
autc04 Jan 24, 2018
dc8abcf
hook up NumToString and StringToNum to the new dispatch logic
autc04 Jan 25, 2018
f101fd2
don't crash on SetWTitle(window, NULL) (Think C seems to do this)
autc04 Jan 25, 2018
ae9ced1
Kill OSErrRET, INTEGERRET, BOOLEANRET - they might have been relevant…
autc04 Jan 25, 2018
3a9d6d9
add 0x prefix in Unknown selector error message
autc04 Jan 27, 2018
a51a769
remove check for trap table completeness, it has done its job
autc04 Jan 27, 2018
e3a206a
deal with non-significant bits in trap selectors
autc04 Jan 27, 2018
938019f
remove toolstuff
autc04 Jan 27, 2018
bc66558
remove some now-redundant stubs
autc04 Jan 27, 2018
8e9c8b8
continue migration of selector functions
autc04 Jan 27, 2018
a281e5f
switch off logging
autc04 Jan 27, 2018
c08da16
fix REGISTER_TRAP macro
autc04 Jan 27, 2018
420780f
more unused stubs
autc04 Jan 27, 2018
a35e562
many OS traps
autc04 Jan 28, 2018
6d028bc
remove stubs that are no longer needed
autc04 Jan 28, 2018
bfc49da
more traps handled by new mechanism
autc04 Jan 28, 2018
716b13b
include some things via <> instead of "" to prevent confusion on case…
autc04 Jan 28, 2018
8bf5ebd
new-style file manager traps
autc04 Jan 29, 2018
f5798b4
old trap tables now unused. remove.
autc04 Jan 29, 2018
218ce7a
cleanup
autc04 Jan 29, 2018
0bb1c5f
Merge pull request #1 from MaddTheSane/integrateSM
autc04 Jan 29, 2018
aa2ad8d
do_selector_table no longer needed
autc04 Jan 29, 2018
ff8e31c
new dispatchers for MixedMode and CFM (although they don't work yet)
autc04 Jan 31, 2018
7491ea8
more cleanup in emustubs: do_selector_block can go now
autc04 Jan 31, 2018
92c6059
FSDispatch trap
autc04 Feb 1, 2018
dba4a63
Enable trap logging from command line using a new -logtraps switch; c…
autc04 Feb 1, 2018
5c6e8c5
disable unnecessary log output
autc04 Feb 1, 2018
4af0335
flushcache -> FlushCodeCache
autc04 Feb 1, 2018
2efb4d3
fix calling conventions for ResrvMem, PurgeMem, Enqueue
autc04 Feb 2, 2018
562aafb
invoke patched traps
autc04 Feb 2, 2018
cad76bc
remove rsys/types.h and other header-file cleanup
autc04 Feb 2, 2018
388e915
more include cleanup
autc04 Feb 2, 2018
f49d236
rearrange some more things in headers
autc04 Feb 3, 2018
1541a9a
more header rearrangements
autc04 Feb 3, 2018
72f7b54
pascal calling convention handled by templates
autc04 Feb 6, 2018
dd9dbad
move logging to separate module
autc04 Feb 9, 2018
1678bb1
split up functions.cpp into traps.cpp and traps.instances.cpp
autc04 Feb 9, 2018
726e479
rename namespace functions -> traps
autc04 Feb 9, 2018
8e8e736
get ready for api-module.h
autc04 Feb 9, 2018
f779b0d
instantiate templates in separate source files (mostly for compilatio…
autc04 Feb 10, 2018
a8ee6e9
remove old ptoc/ctop code
autc04 Feb 10, 2018
a503b9c
everything.h: use <> includes
autc04 Feb 12, 2018
d0336b7
Merge branch 'master' into logging
autc04 Feb 12, 2018
bf7cd30
Merge pull request #2 from autc04/logging
autc04 Feb 12, 2018
0160cce
scanuniversalheaders.pl: auto-insert PASCAL_TRAP and PASCAL_SUBTRAP
autc04 Feb 12, 2018
d7d65f3
logging: fix missing namedThings entry for subtraps
autc04 Feb 12, 2018
14b3613
SpeechManager traps (run scanuniversalheaders.pl and kapimodules.pl)
autc04 Feb 12, 2018
0d57e52
SIGDIGLEN from Apple headers conflicts with SANE.h, add #undef
autc04 Feb 12, 2018
e565bb3
Gestalt: report that Speech Manager is available
autc04 Feb 12, 2018
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
2 changes: 1 addition & 1 deletion docs/ROMinfo
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Minor work that needs to be done

OpenCPicture just calls OpenPicture.

RestoreClutDevice needs work
RestoreDeviceClut needs work

inverse color table routines don't do a good job of discriminating
between colors that are close to each other.
2 changes: 1 addition & 1 deletion docs/faq.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ GetStdFilterProc, SetDialogCancelItem, SetDialogTracksCursor, OutlineMetrics, Fl
<para>
GDeviceChanged, PortChanged, PixPatChanged and CTabChanged are poorly
implemented. GetCPixel doesn't work for bpp > 8. OpenCPicture just
calls OpenPicture. RestoreClutDevice's implementation is shaky. Our
calls OpenPicture. RestoreDeviceClut's implementation is shaky. Our
inverse color table routines don't do a good job of discriminating
between colors that are close to each other.
</para>
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/t1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4305,7 +4305,7 @@
><P
>&#13;GDeviceChanged, PortChanged, PixPatChanged and CTabChanged are poorly
implemented. GetCPixel doesn't work for bpp &#62; 8. OpenCPicture just
calls OpenPicture. RestoreClutDevice's implementation is shaky. Our
calls OpenPicture. RestoreDeviceClut's implementation is shaky. Our
inverse color table routines don't do a good job of discriminating
between colors that are close to each other.
</P
Expand Down
2 changes: 1 addition & 1 deletion docs/unimplemented
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ with System 7.0

GDeviceChanged, PortChanged, PixPatChanged and CTabChanged are poorly
implemented. GetCPixel doesn't work for bpp > 8. OpenCPicture just
calls OpenPicture. RestoreClutDevice's implementation is shakey.
calls OpenPicture. RestoreDeviceClut's implementation is shakey.
3 changes: 2 additions & 1 deletion src/AE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "rsys/mman.h"
#include "rsys/flags.h"
#include "rsys/functions.impl.h"

namespace Executor
{
Expand Down Expand Up @@ -555,7 +556,7 @@ OSErr Executor::C_AEDisposeToken(AEDesc *theToken)
return noErr;
}

OSErr Executor::C_AEREesolve(AEDesc *objectSpecifier, INTEGER callbackFlags,
OSErr Executor::C_AEResolve(AEDesc *objectSpecifier, INTEGER callbackFlags,
AEDesc *theToken)
{
warning_unimplemented(NULL_STRING);
Expand Down
7 changes: 4 additions & 3 deletions src/AE_desc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "rsys/mman.h"
#include "rsys/apple_events.h"
#include <algorithm>

using namespace Executor;

Expand Down Expand Up @@ -564,7 +565,7 @@ ae_desc_to_ptr(descriptor_t *desc,
desc_data = DESC_DATA(desc);
desc_size = GetHandleSize(desc_data);

copy_size = MIN(desc_size, max_size);
copy_size = std::min(desc_size, max_size);

memcpy(data, STARH(desc_data), copy_size);

Expand Down Expand Up @@ -1092,7 +1093,7 @@ OSErr Executor::C_AEGetAttributePtr(AppleEvent *evt, AEKeyword keyword,
data, max_size, size_out);
AE_RETURN_ERROR(AEDisposeDesc(coerced_desc));
}

/* This does not exist.
OSErr Executor::C_AEDeleteAttribute(AppleEvent *evt, AEKeyword keyword)
{
if(!APPLE_EVENT_CLASS_P(evt))
Expand All @@ -1103,7 +1104,7 @@ OSErr Executor::C_AEDeleteAttribute(AppleEvent *evt, AEKeyword keyword)
else
AE_RETURN_ERROR(noErr);
}

*/
OSErr Executor::C_AESizeOfAttribute(AppleEvent *evt, AEKeyword keyword,
GUEST<DescType> *type_out,
GUEST<Size> *size_out)
Expand Down
22 changes: 8 additions & 14 deletions src/AE_hdlr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,12 @@

using namespace Executor;

#define hdlr_table(system_p, class) \
({ \
AE_info_t *info; \
AE_zone_tables_h zone_tables; \
\
info = MR(LM(AE_info)); \
\
zone_tables = ((system_p) \
? MR(info->system_zone_tables) \
: MR(info->appl_zone_tables)); \
\
HxP(zone_tables, class##_hdlr_table); \
})
inline AE_zone_tables_h get_zone_tables(bool system_p)
{
auto info = MR(LM(AE_info));
return system_p ? MR(info->system_zone_tables) : MR(info->appl_zone_tables);
}
#define hdlr_table(system_p, class) HxP(get_zone_tables(system_p), class##_hdlr_table)

void Executor::AE_init(void)
{
Expand Down Expand Up @@ -141,7 +134,7 @@ hdlr_table_elt(AE_hdlr_table_h table,
}

OSErr Executor::C__AE_hdlr_table_alloc(int32_t unknown_1, int32_t unknown_2,
int32_t unknown_3, int8 unknown_p,
int32_t unknown_3, int8_t unknown_p,
GUEST<AE_hdlr_table_h> *table_return)
{
AE_hdlr_table_h table;
Expand Down Expand Up @@ -431,6 +424,7 @@ OSErr Executor::C_AEInstallSpecialHandler(
if(function_class == keySelectProc)
{
AE_OSL_select_fn = US_TO_SYN68K((void *)hdlr_fn);
warning_unimplemented("AEInstallSpecialHandler: keySelectProc set");
AE_RETURN_ERROR(noErr);
}

Expand Down
25 changes: 18 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ add_subdirectory(config/arch/generic_le)
add_subdirectory(config/os/win32)
add_subdirectory(config/os/macosx)


function(linkheader from to variant)
if(DEFINED ARGV3)
set(input ${ARGV3})
Expand Down Expand Up @@ -168,25 +167,30 @@ source_group(AppleEvents FILES ${ae_sources})

set(sound_sources sounddriver.cpp sound.cpp soundIMVI.cpp soundfake.cpp snth5.cpp
SpeechManager.cpp)
if(HOST_OS STREQUAL macosx)
set(sound_sources ${sound_sources} SpeechManager-MacBridge.mm)
endif()
source_group(Sound FILES ${sound_sources})

set(num_sources bindec.cpp float4.cpp float5.cpp float7.cpp floatnext.cpp toolmath.cpp
mathlib.cpp)
source_group(Numerics FILES ${num_sources})

set(misc_sources desk.cpp device.cpp disk.cpp diskinit.cpp dump.cpp trapname.cpp font.cpp
set(misc_sources
traps.cpp logging.cpp
desk.cpp device.cpp disk.cpp diskinit.cpp dump.cpp trapname.cpp font.cpp
gestalt.cpp globals.cpp iu.cpp launch.cpp main.cpp mman.cpp mmansubr.cpp notify.cpp hle.cpp
osevent.cpp osutil.cpp pack.cpp scrap.cpp script.cpp segment.cpp serial.cpp
slash.cpp stdfile.cpp romlib_stubs.cpp syserr.cpp toolevent.cpp toolutil.cpp time.cpp
vbl.cpp syncint.cpp virtualint.cpp refresh.cpp autorefresh.cpp aboutbox.cpp
option.cpp parseopt.cpp parsenum.cpp desperate.cpp
option.cpp parseopt.cpp parsenum.cpp
version.cpp shutdown.cpp uniquefile.cpp screen-dump.cpp
process.cpp alias.cpp string.cpp tempmem.cpp edition.cpp fontIMVI.cpp balloon.cpp
error.cpp adb.cpp color_wheel_bits.cpp finder.cpp system_error.cpp ibm_keycodes.cpp
icon.cpp redrawscreen.cpp ini.cpp checkpoint.cpp qt.cpp
paramline.c fauxdbm.cpp commtool.cpp cfm.cpp pef_hash.cpp
interfacelib.cpp mixed_mode.cpp suffix_maps.cpp appearance.cpp lockrange.cpp
emutrap.cpp emutraptables.cpp emustubs.cpp unix_like.cpp parse.ypp check_structs.cpp
emutrap.cpp emustubs.cpp unix_like.cpp parse.ypp check_structs.cpp
executor.cpp crc.cpp)

set(include_sources hintemplate.h
Expand Down Expand Up @@ -252,7 +256,6 @@ set(include_sources hintemplate.h
include/rsys/dcache.h
include/rsys/depthconv.h
include/rsys/desk.h
include/rsys/desperate.h
include/rsys/device.h
include/rsys/dial.h
include/rsys/dirtyrect.h
Expand All @@ -271,6 +274,8 @@ set(include_sources hintemplate.h
include/rsys/float_fcw.h
include/rsys/floatconv.h
include/rsys/font.h
include/rsys/functions.h
include/rsys/functions.impl.h
include/rsys/gestalt.h
include/rsys/glue.h
include/rsys/gworld.h
Expand All @@ -289,6 +294,7 @@ set(include_sources hintemplate.h
include/rsys/launch.h
include/rsys/list.h
include/rsys/lockunlock.h
include/rsys/logging.h
include/rsys/lowglobals.h
include/rsys/m68kint.h
include/rsys/macros.h
Expand Down Expand Up @@ -319,7 +325,6 @@ set(include_sources hintemplate.h
include/rsys/print.h
include/rsys/process.h
include/rsys/PSstrings.h
include/rsys/pstuff.h
include/rsys/qcolor.h
include/rsys/quick.h
include/rsys/rawblt.h
Expand Down Expand Up @@ -354,7 +359,8 @@ set(include_sources hintemplate.h
include/rsys/toolutil.h
include/rsys/trapglue.h
include/rsys/trapname.h
include/rsys/types.h
include/rsys/traps.h
include/rsys/traps.impl.h
include/rsys/uniquefile.h
include/rsys/vbl.h
include/rsys/vdriver.h
Expand All @@ -370,6 +376,7 @@ set(include_sources hintemplate.h
include/ShutDown.h
include/SoundDvr.h
include/SoundMgr.h
include/SpeechManager.h
include/StartMgr.h
include/StdFilePkg.h
include/SysErr.h
Expand All @@ -383,12 +390,15 @@ set(include_sources hintemplate.h
mkvol/mkvol.h
mkvol/mkvol_internal.h)

include(trap_instances/trap_instances.cmake)

set(sources ${ctl_sources} ${dial_sources}
${list_sources} ${menu_sources}
${print_sources} ${qd_sources} ${res_sources}
${te_sources} ${wind_sources} ${ae_sources}
${sound_sources} ${num_sources} ${misc_sources}
${file_sources} ${hfs_sources}
${trap_instance_sources}
${include_sources})

add_executable(executor ${sources}
Expand All @@ -404,3 +414,4 @@ else()
endif()

target_link_libraries(executor Threads::Threads syn68k)

2 changes: 1 addition & 1 deletion src/PSprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ num_image_bytes(int numbytes, int pixelsize, int direct_color_p)
#define ROWMASK 0x1FFF
#endif

void Executor::NeXTPrBits(BitMap *srcbmp, Rect *srcrp, Rect *dstrp,
void Executor::NeXTPrBits(const BitMap *srcbmp, const Rect *srcrp, const Rect *dstrp,
LONGINT mode, RgnHandle mask, GrafPtr thePortp)
{
float scalex, scaley;
Expand Down
Loading