Commit Graph

87 Commits

Author SHA1 Message Date
Ricky Zhang
342fbbce34
Port mini vMac guest OS screen ROM patch.
- Added Mac SE 24 bit ROM screen patch from mini vMac.
  The guest OS resolution in System 6 can be defined
  at an arbitrary combination.
- Mac frame buffer base mapping is moved out from guest RAM.
  This creates more leg room for the host frame buffer.
- Enable System 6 vscreen support in SDL2. Passed build and test.
- Enable System 6 vscreen support in SDL1. Passed build and test.
- Eanble System 6 vscreen support in XWidnow. Passed build and test.

See my [screen cast demo here](https://youtu.be/aXzM8t_u3zI)

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2020-07-15 19:14:36 -04:00
Ricky Zhang
a46759990d
Backport SDL2 features from https://github.com/kanjitalk755/macemu
By default, without providing `with-sdl2` in configure it uses SDL1.
Users need to explicitly request SDL2.

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2020-06-25 15:28:41 -04:00
bolt
767b97311b Add the strings from commit 00f02d9d0c to user_strings.h 2020-04-09 14:50:07 +02:00
MSharq
90b65715ae added VDE functionality 2018-09-28 16:14:14 +02:00
Alexei Svitkine
1e4e7179d4 more changes needed to move STR_WINDOW_TITLE_GRABBED cross-platform code 2017-12-10 11:27:03 -05:00
Ricky Zhang
f3895493ae Add break point function for Basilisk II in cxmon.
To enter break point, you need to run a m68k program in Macintosh guest OS. The program
executes a new emul_op instruction 0x7138. The program will be provided
in cxmon/utils folder in a separate commit. Once emulation is suspended,
you can enter below new cxmon command to manipluate break points:

ba [address]             Add a break point
br [breakpoints#]        Remove a break point. If # is 0, remove all break points.
bd [breakpoints#]        Disable a break point. If # is 0, disable all break points.
be [breakpoints#]        Enable a break point. If # is 0, enable all break points.
bi                       List all break points
bs "file"                Save all break points to a file
bl "file"                Load break points from a file

Once emulation PC reach break point address, it automatically suspends
and traps into cxmon.

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2017-09-03 00:26:01 -04:00
Dmitry Brant
e1693eb92b Correctly set last-modified time on exported files. 2016-07-29 11:45:51 -04:00
James Touton
a6a46a2697 Unicode friendly! 2015-08-06 02:34:24 -07:00
James Touton
f35cb736c7 Changed type of audio_channel_counts; fixes type conversion warnings on MSVC. 2015-08-06 01:34:55 -07:00
James Touton
1d875960db Propagate error information from set_gamma_table. 2015-08-06 01:31:26 -07:00
James Touton
3271fc9d28 Added lengthof. 2015-08-06 01:02:19 -07:00
Charles
6f2635ee31 More clipboard-related fixes for Basilisk / SheepShaver
This patch fixes one lingering problem with the 64-bit clipboard code; the way it was designed, the Mac clipboard was being cleared every time a single item was being requested by GetScrap, causing clipboards with multiple items to be unceremoniously whittled down to one. On the other hand, a similar issue was causing some items to get duplicated on the host pasteboard. This patch fixes the issue by making conversion between the host pasteboard and the Mac clipboard a singular operation; when the pasteboard data changes on the host side, it is all converted and sent to the Mac pasteboard at once, and similarly, all Mac clipboard data is sent to the host pasteboard in one operation. Also, data from the host side is copied to the Mac clipboard only if it has changed since the last check, which should improve performance as conversions will not be done over and over every time the Mac side checks whether the scrap has changed.

In addition, I've added a rudimentary PICT converter. It's rudimentary at the moment, only going in one direction, converting to PICT and not from PICT, and currently it always rasterizes the source image and creates a PICT containing bitmap data. However, it's a start, and it should solve Ronald's issue with copying images from OS X to Mac OS. In the future, more could possibly be added. I've put the new PICT code in the main source directory instead of in the MacOSX subdirectory, so that it can be used by other platforms if needed.

I would like to leave the license on the new PICT code as "Public Domain" if that is okay.

Thanks,
Charles
2012-07-07 11:30:21 -04:00
CharlesJS
ed28705ee3 Patch for copying and pasting styled text in Basilisk II / SheepShaver
Added code to parse the Classic Mac OS 'styl' resources, allowing formatted text to be copied and pasted out of SheepShaver, not just plain text. In order to do this, I made some changes to the emul_op mechanism, patching ZeroScrap() in addition to the scrap methods that were already being patched. The reason for this is that since we need to read data from multiple items that are on the clipboard at once, we cannot simply assume a zero at the beginning of each PutScrap() operation.

This patch uses RTF to store styled text on the host side; unfortunately, since the APIs to convert to and from RTF data are in Cocoa but not in CoreFoundation, I had to write the new portions in Objective-C rather than C, and changed the extension from .cpp to .mm accordingly. In the future, if we are confident that this file will only be used on Mac OS X 10.6 and up, we can rewrite the Pasteboard Manager code to use NSPasteboardReading/Writing instead. This would allow us to read and write NSAttributedString objects directly to and from the pasteboard, which would make sure we were always using the OS's preferred rich text format internally instead of hard-coding it specifically to RTF as in the current implementation.

I believe that this patch should also fix the problem Ronald reported with copying accented characters.

Since I am new to 68k assembly and the emul_op mechanism, I would appreciate if someone could double-check all my changes to make sure that I have done everything correctly.

Thanks,
Charles
2012-06-30 22:20:55 -04:00
asvitkine
d0c46de7c3 BasiliskII side of changes to support .sheepvm bundles for SheepShaver 2009-07-23 19:19:14 +00:00
gbeauche
c8cb4879a4 Happy New Year! 2008-01-01 09:40:36 +00:00
asvitkine
a70c79b3cb support for prefs stuff 2007-07-28 15:45:12 +00:00
asvitkine
f12f5173be macroman_to_host_encoding - so it works the other way around too 2007-01-24 02:37:06 +00:00
asvitkine
ab86a395da Since Guest and Host OS may use different text encodings for filenames,
I am adding functionality to support this. For the moment, I've only
added the platform-specific conversion for MacOSX (ie: UTF8 -> MacRoman),
but others can be added later.
2007-01-22 17:14:06 +00:00
gbeauche
61a2e86594 Rewrite MacOS X CD-ROM support.
Other bugs fixed:
- CD-ROM media are polled and now can be changed without rebooting
- Buffer overflow, memory leak and extra wait in CD-ROM ejection code
2006-05-08 12:15:58 +00:00
gbeauche
4f07113555 Patch SynchIdleTime() to implement new "idlewait" prefs item. 2006-04-30 21:16:48 +00:00
cebix
a415ed6117 added missing virtual destructor 2005-11-24 16:43:11 +00:00
gbeauche
b52fd5535b GUI cosmetics 2005-11-20 17:26:16 +00:00
gbeauche
e355c83f59 Add system-specific implementations of idle_{wait,resume} functions. 2005-06-30 10:20:18 +00:00
gbeauche
8532e34485 Update GTK Prefs Editor with support for "jitinline" and "slirp" ethernet. 2005-06-06 20:11:50 +00:00
gbeauche
143b18c752 Make ethernet really work on 64-bit platforms, especially x86-64 2005-03-19 17:43:03 +00:00
gbeauche
30632aed4f Happy New Year! 2005-01-30 21:42:16 +00:00
gbeauche
d075282607 new way to allocate dt_store 2005-01-08 08:57:53 +00:00
gbeauche
655269516d Windows debug functions only in native win32 mode 2004-11-21 08:11:20 +00:00
gbeauche
e85f4397c8 Backport copy-paste of 'TEXT' from SheepShaver 2004-11-15 23:27:43 +00:00
gbeauche
df471bbbe6 Fix build on Windows with recent gcc (winbug) 2004-11-15 00:24:16 +00:00
cebix
9e7932abf0 Happy New Year! :) 2004-01-12 15:29:31 +00:00
gbeauche
0b001e81a5 Additional string defs for JIT-specific options 2002-09-17 16:07:21 +00:00
cebix
8871da753d - added infrastructure for multi-monitor support; only video_x.cpp is
converted for the new scheme; not actually tested with a mult-monitor
  setup yet but at least single-monitor display doesn't seem to be broken
  (UAE banked addressing would definitely require some extensions to handle
  multiple frame buffers)
- struct video_mode has an extra field that is free for use by platform-
  specific code
2002-04-25 11:00:31 +00:00
cebix
9009fc63a0 some cleanups in the sound component 2002-03-10 19:34:11 +00:00
cebix
628533940d - documentation updates
- 2001 -> 2002
- version 0.9 -> 1.0
2002-01-15 14:58:43 +00:00
cebix
b36675d9c2 prepared XPRAM code for PowerMac emulation (8192 bytes NVRAM) 2001-10-07 19:50:21 +00:00
cebix
72c7f0db7a - updated the TECH document
- EtherReset() clears the UDP protocol list
- audio_oss_esd.cpp: AudioExit() calls close_audio()
- ether_unix.cpp: uses map<> for protocol handlers
- updated audio_dummy.cpp and ether_dummy.cpp
2001-07-13 15:39:25 +00:00
cebix
6c35c2a9e8 - Implemented AppleTalk-over-UDP tunnelling, activated by setting "udptunnel"
to "true". This uses the BSD socket API, so it's fairly portable (currently
  only imeplemented under Unix, though). This works by sending raw Ethernet
  packets as UDP packets to a fixed port number ("udpport", default is 6066),
  using IP broadcasts to simulate Ethernet broad- and multicasts. Currently
  only tested with AppleTalk.
2001-07-12 19:48:28 +00:00
cebix
5868a40a37 - ADB has its own interrupt flag, INTFLAG_ADB
- ADBMouseMoved(), ADBMouseDown/Up() and ADBKeyDown/Up() trigger the ADB
  interrupt
- ADB mutex is only used for mouse movement (the only input state where it
  matters)
- adb.cpp: toggling relative mouse mode resets mouse_x/y
- PrimeTime(0) schedules a timer task with 0 delay time; this is still not
  the correct implementation, but it makes MacSyndicate work...
- Unix: pthreads are preferred to POSIX.4 timers for 60Hz ticks because the
  timers drift badly under Linux and the thread can compensate for drifting
  well enough
- Unix: moved GetTicks_usec() and Delay_usec() to timer_unix.cpp
- video_x.cpp: X mouse acceleration is disabled in relative mouse mode because
  MacOS does its own acceleration
- video_x.cpp: palette[].pixel and palette[].flags are always preset
- video_x.cpp: decoupled X event handling from 60Hz video refresh cycle by
  using select() with a timeout on the X fd
2001-07-09 11:22:01 +00:00
cebix
e7a13421df replaced TIME_OFFSET constant by portable TimeToMacTime() function 2001-07-06 17:36:09 +00:00
cebix
7eb6ed2b86 - supported audio formats are now kept in STL vectors
- added run-time audio parameter switching for OSS/ESD audio output
- setting ESPEAKER env variable causes B2 to try ESD before OSS
2001-07-05 20:30:54 +00:00
cebix
abd6539568 some small fixes 2001-07-04 11:12:20 +00:00
cebix
d0a4b3e5fc - improved compatibility of multiple depth/resolution handling with versions
of MacOS before 7.6:
   - Apple mode IDs are now allocated contiguously from 0x80 (the video_*.cpp
     module must call video_init_depth_list() after adding all modes)
   - if the video driver didn't receive a GetVideoParameters call, it patches
     ScrnBase and the main GDevice upon a video mode switch (otherwise MacOS
     will continue to use the old frame buffer base)
   - the rowBytes values in the video parameters slot resources are correct
     for all bit depths
2001-07-03 19:20:47 +00:00
cebix
cf22cb032a - added support for platform-independant mutexes, currently only properly
implemented under Unix
- adb.cpp uses mutexes for thread-safe mouse handling
- video_x.cpp: pressing Ctrl-F5 in windowed mode switches to a "grabbed"
  relative mouse mode, useful for some games
- video_x.cpp: fixed some bugs relating to the hotkeys (key releases are no
  longer treated as hotkeys)
2001-07-03 15:59:49 +00:00
cebix
5bd08dac88 - video_set_palette() gets passed the number of used palette entries
- video_x.cpp supports 2- and 4-bit modes on truecolor screens
2001-07-01 21:09:30 +00:00
cebix
73912e732e fixed compilation problems on BeOS/ppc 2001-07-01 12:42:04 +00:00
cebix
a4b36fd674 - added some documentation
- VidLocal.sp -> VidLocal.slot_param
- X11 color map is loaded with ramp upon startup to avoid the annoying black
  screen during initialization
2001-07-01 00:46:38 +00:00
cebix
b0b21f7fe6 - experimental gamma table support
- restructured video_x.cpp: uses classes for display types
2001-06-30 17:21:56 +00:00
cebix
738fa25344 slot ROM checksum is recalculated after patching during resolution switch 2001-06-29 12:51:21 +00:00
cebix
0cf3f32b7d video_x.cpp supports resolution switching in windowed mode: the available
resolutions are 512x384, 640x480, 800x600, 1024x768 and 1280x1024 (the prefs
editor has to be updated to reflect this). The resolution selected in the
prefs editor is used as the default, but it can be changed in the Monitors
control panel. So far only tested with direct addressing.
2001-06-28 21:20:02 +00:00