davidludwig / macemu Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cebix/macemu
Basilisk II and SheepShaver Macintosh emulators
This project forked from cebix/macemu
Basilisk II and SheepShaver Macintosh emulators
With SDL2 port, using something else than a QWERTY mac keyboard is not usable..... Seems that keyboard definition file do not work.
The present releases do not (yet?) use the keycodes file, which makes use with non-US keyboard layouts difficult.
I use commit c6fefd0.
Get SDL v2 submodule
git submodule update --recursive --remote --init
Open project file macemu/BasiliskII/src/MacOSX/BasiliskII.xcodeproj. I have the following compile error:
CompileC /Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/Objects-normal/x86_64/fpu_uae.o /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/Ricky/repo/github/macemu/BasiliskII/src/MacOSX
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -fmodules -gmodules -fmodules-cache-path=/Users/Ricky/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/Ricky/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.7 -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -iquote /Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/BasiliskII-generated-files.hmap -I/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/BasiliskII-own-target-headers.hmap -I/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/BasiliskII-all-target-headers.hmap -iquote /Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/BasiliskII-project-headers.hmap -I/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Products/Debug/include -I/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Products/Debug/SDL2.framework/Headers -I../UNIX -I../include -I. -I../uae_cpu -I/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/DerivedSources/x86_64 -I/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/DerivedSources -F/Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Products/Debug -F/Library/Frameworks -MMD -MT dependencies -MF /Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/Objects-normal/x86_64/fpu_uae.d --serialize-diagnostics /Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/Objects-normal/x86_64/fpu_uae.dia -c /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp -o /Users/Ricky/Library/Developer/Xcode/DerivedData/BasiliskII-harxfjzzbxzhpogfqyaqibwdnbzm/Build/Intermediates/BasiliskII.build/Debug/BasiliskII.build/Objects-normal/x86_64/fpu_uae.o
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:94:
/Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/newcpu.h:216:20: warning: implicit conversion loses integer precision: 'long' to 'uaecptr' (aka 'unsigned int') [-Wshorten-64-to-32]
return regs.pc + ((char *)regs.pc_p - (char *)regs.pc_oldp);
~~~~~~ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:59:2: error: unknown type name 'fpu_register'
fpu_register registers[8];
^
../uae_cpu/fpu/core.h:62:2: error: unknown type name 'fpu_register'
fpu_register result;
^
../uae_cpu/fpu/core.h:222:8: error: unknown type name 'fpu_register'
inline fpu_register * const fpu_register_address(int i)
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:58:16: error: unknown type name 'fpu_register'
PRIVATE inline fpu_register round_to_zero(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:58:43: error: use of undeclared identifier 'fpu_register'; did you mean 'fpu_reset'?
PRIVATE inline fpu_register round_to_zero(fpu_register const & x);
^~~~~~~~~~~~
fpu_reset
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:244:13: note: 'fpu_reset' declared here
extern void fpu_reset(void);
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:58:9: warning: inline variables are a C++1z extension [-Wc++1z-extensions]
PRIVATE inline fpu_register round_to_zero(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:58:56: error: expected ')'
PRIVATE inline fpu_register round_to_zero(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:58:42: note: to match this '('
PRIVATE inline fpu_register round_to_zero(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:59:16: error: unknown type name 'fpu_register'
PRIVATE inline fpu_register round_to_nearest(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:59:46: error: use of undeclared identifier 'fpu_register'; did you mean 'fpu_reset'?
PRIVATE inline fpu_register round_to_nearest(fpu_register const & x);
^~~~~~~~~~~~
fpu_reset
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:244:13: note: 'fpu_reset' declared here
extern void fpu_reset(void);
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:59:9: warning: inline variables are a C++1z extension [-Wc++1z-extensions]
PRIVATE inline fpu_register round_to_nearest(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:59:59: error: expected ')'
PRIVATE inline fpu_register round_to_nearest(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:59:45: note: to match this '('
PRIVATE inline fpu_register round_to_nearest(fpu_register const & x);
^
../uae_cpu/fpu/fpu_uae.h:73:41: error: use of undeclared identifier 'fpu_register'; did you mean 'fpu_reset'?
PRIVATE inline void FFPU get_dest_flags(fpu_register const & r);
^~~~~~~~~~~~
fpu_reset
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:244:13: note: 'fpu_reset' declared here
extern void fpu_reset(void);
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:73:9: warning: inline variables are a C++1z extension [-Wc++1z-extensions]
PRIVATE inline void FFPU get_dest_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:73:26: error: variable has incomplete type 'void'
PRIVATE inline void FFPU get_dest_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:73:54: error: expected ')'
PRIVATE inline void FFPU get_dest_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:73:40: note: to match this '('
PRIVATE inline void FFPU get_dest_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:74:43: error: use of undeclared identifier 'fpu_register'; did you mean 'fpu_reset'?
PRIVATE inline void FFPU get_source_flags(fpu_register const & r);
^~~~~~~~~~~~
fpu_reset
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:244:13: note: 'fpu_reset' declared here
extern void fpu_reset(void);
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:74:9: warning: inline variables are a C++1z extension [-Wc++1z-extensions]
PRIVATE inline void FFPU get_source_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:74:26: error: variable has incomplete type 'void'
PRIVATE inline void FFPU get_source_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:74:56: error: expected ')'
PRIVATE inline void FFPU get_source_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:74:42: note: to match this '('
PRIVATE inline void FFPU get_source_flags(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:76:35: error: use of undeclared identifier 'fpu_register'; did you mean 'fpu_reset'?
PRIVATE inline bool FFPU do_isnan(fpu_register const & r);
^~~~~~~~~~~~
fpu_reset
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:244:13: note: 'fpu_reset' declared here
extern void fpu_reset(void);
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:76:9: warning: inline variables are a C++1z extension [-Wc++1z-extensions]
PRIVATE inline bool FFPU do_isnan(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:76:48: error: expected ')'
PRIVATE inline bool FFPU do_isnan(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:76:34: note: to match this '('
PRIVATE inline bool FFPU do_isnan(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:76:35: warning: address of function 'fpu_reset' will always evaluate to 'true' [-Wpointer-bool-conversion]
PRIVATE inline bool FFPU do_isnan(fpu_register const & r);
~~~~~~~~ ^~~~~~~~~~~~
../uae_cpu/fpu/fpu_uae.h:76:35: note: prefix with the address-of operator to silence this warning
PRIVATE inline bool FFPU do_isnan(fpu_register const & r);
^
&
../uae_cpu/fpu/fpu_uae.h:77:35: error: use of undeclared identifier 'fpu_register'; did you mean 'fpu_reset'?
PRIVATE inline bool FFPU do_isinf(fpu_register const & r);
^~~~~~~~~~~~
fpu_reset
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:97:
In file included from ../uae_cpu/fpu/fpu.h:47:
../uae_cpu/fpu/core.h:244:13: note: 'fpu_reset' declared here
extern void fpu_reset(void);
^
In file included from /Users/Ricky/repo/github/macemu/BasiliskII/src/uae_cpu/fpu/fpu_uae.cpp:98:
../uae_cpu/fpu/fpu_uae.h:77:9: warning: inline variables are a C++1z extension [-Wc++1z-extensions]
PRIVATE inline bool FFPU do_isinf(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:77:48: error: expected ')'
PRIVATE inline bool FFPU do_isinf(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:77:34: note: to match this '('
PRIVATE inline bool FFPU do_isinf(fpu_register const & r);
^
../uae_cpu/fpu/fpu_uae.h:77:35: warning: address of function 'fpu_reset' will always evaluate to 'true' [-Wpointer-bool-conversion]
PRIVATE inline bool FFPU do_isinf(fpu_register const & r);
~~~~~~~~ ^~~~~~~~~~~~
../uae_cpu/fpu/fpu_uae.h:77:35: note: prefix with the address-of operator to silence this warning
PRIVATE inline bool FFPU do_isinf(fpu_register const & r);
^
&
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.
At least one user has reported issues with this port of Basiliak II. Being able to have users send diagnostic information, perhaps via a log file, may be helpful in tracking down these issues.
Case in point: Issue #6
Fixing Issue #16, which undid a now-apparent hack to get Thousands of Colors working on OS X, led to Thousands of Colors not working (again) on OS X. Screenshot attached.
Steps to reproduce:
Expected Result: window resizes, and guest OS display stretches (or unstretches) as appropriate
Observed Result: window resizes, but guest OS display does not stretch, and becomes unusable!
Tried BasiliskII prerelease 6 for OSX as posted in Emaculation forum, with System 7.5.5 on macOS 10.12.6 (Sierra).
Startup proceeds up to and including extension icons racing (much too fast) along the bottom of the screen and then it stops with only the desktop background showing. Mouse arrow shows and can be moved, but no icons on the desktop and no menu bar.
Prefs file:
disk /Users/ronald/Applications/BasiliskII/BasiliskII map/kanjer755.dmg
disk /Users/ronald/Applications/BasiliskII/BasiliskII map/heenenweer.dmg
extfs /Users/ronald/Applications/BasiliskII/BasiliskII map/doorgeefluik
screen win/1024/768
seriala
serialb
ether slirp
udptunnel false
udpport 6066
rom /Users/ronald/Applications/BasiliskII/BasiliskII map/MAC.ROM
bootdrive 0
bootdriver 0
ramsize 268435456
frameskip 0
modelid 14
cpu 4
fpu true
nocdrom false
nosound false
noclipconversion false
nogui false
jit false
jitfpu true
jitdebug false
jitcachesize 2048
jitlazyflush true
jitinline true
keyboardtype 5
keycodes true
keycodefile /Users/ronald/Applications/BasiliskII/BasiliskII map/BasiliskII_keycodes
mousewheelmode 1
mousewheellines 3
dsp
mixer
ignoresegv true
idlewait true
This is NOT an issue in your SDL2. But I can't find anyone who can discuss this topic with. Sorry to abuse your issue board.
Recently, I'm working on enabling 24 bit ROM in BII. Someone fixed broken frame buffer memory access. I fixed emulated hard drive. Now I want to make it work under SDL.
I traced the frame buffer drawing in the host down to the function in below.
Before I asked you questions, here is some background
a0000000
.Here are my questions regarding to the function below:
1. I understood that it tries to find the minimum rectangle that contain different pixels between the current the_buffer
and the previous the_buffer_copy
, but what does variable wide
and hide
mean?
1. I have forced SDL use 1 bit per pixel, but the Destination bytes per row are still 512, which is one byte per pixel under 512 x 342.
-- I got the answers.
// Static display update (fixed frame rate, but incremental)
1842 static void update_display_static(driver_base *drv)
1843 {
1844 // Incremental update code
1845 int wide = 0, high = 0;
1846 uint32 x1, x2, y1, y2;
1847 const VIDEO_MODE &mode = drv->mode;
1848 int bytes_per_row = VIDEO_MODE_ROW_BYTES;
1849 uint8 *p, *p2;
1850
1851 // Check for first line from top and first line from bottom that have changed
1852 y1 = 0;
1853 for (uint32 j = 0; j < VIDEO_MODE_Y; j++) {
1854 if (memcmp(&the_buffer[j * bytes_per_row], &the_buffer_copy[j * bytes_per_row], bytes_per_row)) {
1855 y1 = j;
1856 break;
1857 }
1858 }
1859 y2 = y1 - 1;
1860 for (uint32 j = VIDEO_MODE_Y; j-- > y1; ) {
1861 if (memcmp(&the_buffer[j * bytes_per_row], &the_buffer_copy[j * bytes_per_row], bytes_per_row)) {
1862 y2 = j;
1863 break;
1864 }
1865 }
1866 high = y2 - y1 + 1;
1867
1868 // Check for first column from left and first column from right that have changed
1869 if (high) {
1870 if (VIDEO_MODE_DEPTH < VIDEO_DEPTH_8BIT) {
1871 const int src_bytes_per_row = bytes_per_row;
1872 const int dst_bytes_per_row = drv->s->pitch;
1873 const int pixels_per_byte = VIDEO_MODE_X / src_bytes_per_row;
1874
1875 x1 = VIDEO_MODE_X / pixels_per_byte;
1876 for (uint32 j = y1; j <= y2; j++) {
1877 p = &the_buffer[j * bytes_per_row];
1878 p2 = &the_buffer_copy[j * bytes_per_row];
1879 for (uint32 i = 0; i < x1; i++) {
1880 if (*p != *p2) {
1881 x1 = i;
1882 break;
1883 }
1884 p++; p2++;
1885 }
1886 }
1887 x2 = x1;
1888 for (uint32 j = y1; j <= y2; j++) {
1889 p = &the_buffer[j * bytes_per_row];
1890 p2 = &the_buffer_copy[j * bytes_per_row];
1891 p += bytes_per_row;
1892 p2 += bytes_per_row;
1893 for (uint32 i = (VIDEO_MODE_X / pixels_per_byte); i > x2; i--) {
1894 p--; p2--;
1895 if (*p != *p2) {
1896 x2 = i;
1897 break;
1898 }
1899 }
1900 }
1901 x1 *= pixels_per_byte;
1902 x2 *= pixels_per_byte;
1903 wide = (x2 - x1 + pixels_per_byte - 1) & -pixels_per_byte;
1904
1905 // Update copy of the_buffer
1906 if (high && wide) {
1907
1908 // Lock surface, if required
1909 if (SDL_MUSTLOCK(drv->s))
1910 SDL_LockSurface(drv->s);
1911
1912 // Blit to screen surface
1913 int si = y1 * src_bytes_per_row + (x1 / pixels_per_byte);
1914 int di = y1 * dst_bytes_per_row + x1;
1915 for (uint32 j = y1; j <= y2; j++) {
1916 memcpy(the_buffer_copy + si, the_buffer + si, wide / pixels_per_byte);
1917 Screen_blit((uint8 *)drv->s->pixels + di, the_buffer + si, wide / pixels_per_byte);
1918 si += src_bytes_per_row;
1919 di += dst_bytes_per_row;
1920 }
1921
1922 // Unlock surface, if required
1923 if (SDL_MUSTLOCK(drv->s))
1924 SDL_UnlockSurface(drv->s);
1925
1926 // Refresh display
1927 SDL_UpdateRect(drv->s, x1, y1, wide, high);
1928 }
1929
1930 } else {
1931 const int bytes_per_pixel = VIDEO_MODE_ROW_BYTES / VIDEO_MODE_X;
1932 const int dst_bytes_per_row = drv->s->pitch;
1933
1934 x1 = VIDEO_MODE_X;
1935 for (uint32 j = y1; j <= y2; j++) {
1936 p = &the_buffer[j * bytes_per_row];
1937 p2 = &the_buffer_copy[j * bytes_per_row];
1938 for (uint32 i = 0; i < x1 * bytes_per_pixel; i++) {
1939 if (*p != *p2) {
1940 x1 = i / bytes_per_pixel;
1941 break;
1942 }
1943 p++; p2++;
1944 }
1945 }
1946 x2 = x1;
1947 for (uint32 j = y1; j <= y2; j++) {
1948 p = &the_buffer[j * bytes_per_row];
1949 p2 = &the_buffer_copy[j * bytes_per_row];
1950 p += bytes_per_row;
1951 p2 += bytes_per_row;
1952 for (uint32 i = VIDEO_MODE_X * bytes_per_pixel; i > x2 * bytes_per_pixel; i--) {
1953 p--;
1954 p2--;
1955 if (*p != *p2) {
1956 x2 = i / bytes_per_pixel;
1957 break;
1958 }
1959 }
1960 }
1961 wide = x2 - x1;
1962
1963 // Update copy of the_buffer
1964 if (high && wide) {
1965
1966 // Lock surface, if required
1967 if (SDL_MUSTLOCK(drv->s))
1968 SDL_LockSurface(drv->s);
1969
1970 // Blit to screen surface
1971 for (uint32 j = y1; j <= y2; j++) {
1972 uint32 i = j * bytes_per_row + x1 * bytes_per_pixel;
1973 int dst_i = j * dst_bytes_per_row + x1 * bytes_per_pixel;
1974 memcpy(the_buffer_copy + i, the_buffer + i, bytes_per_pixel * wide);
1975 Screen_blit((uint8 *)drv->s->pixels + dst_i, the_buffer + i, bytes_per_pixel * wide);
1976 }
1977
1978 // Unlock surface, if required
1979 if (SDL_MUSTLOCK(drv->s))
1980 SDL_UnlockSurface(drv->s);
1981
1982 // Refresh display
1983 SDL_UpdateRect(drv->s, x1, y1, wide, high);
1984 }
1985 }
1986 }
1987 }
1988
Steps to reproduce:
Expected result: host OS window remains the same size
Observed result: guest OS window reverts to un-resized size
SDL2 has a hint to apply this, which is not yet enabled (in Basilisk II).
When running Basilisk II in fullscreen on OS X, if and when the guest OS changes display resolution, the OS X desktop manager will switch to and from the Basilisk II desktop/Space.
This may be due to deletion and recreation of the SDL2 SDL_Window, on guest display mode changes.
The Mac OS X + SDL2 port of Basilisk II is using SDL2-provided menu-bar defaults, which include keyboard shortcuts for Command + Q, possibly other things. This prevents Command + Q from being used within the guest OS.
Hi,
Nice work!
When access to a host drive is enabled in the windows build, a "T" shows up as name of the disk where one would expect the disk to be called "My Computer".
Best,
Howard
This is an enhancement request and therefore subjective, but I think it'd be neat to have an option for integer scaling; such that if the guest resolution is (for example) 1600x900 and your host resolution is 1920x1080 you get black borders surrounding the screen instead of trying to have half-pixel scaling, which looks a bit ugly.
This can be achieved without an option by adding
SDL_RenderSetIntegerScale(sdl_renderer, SDL_TRUE);
above line 836 in video_sdl2.cpp, but it probably should be an option, because maybe some people are fine with non-integer scaling and whatnot and I'm not cool enough to figure out how to make it an option just yet.
I'm trying to compile your branch on Raspberry Pi Zero.
SDL2 2.0.7 (latest) was compiled per instructions here:
https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/
The SDL2 example runs fine on OpenGL ES.
BasiliskII was compiled with
./configure --enable-sdl-audio --enable-sdl-framework --enable-sdl-video --disable-vosf --without-mon --without-esd --without-gtk --disable-nls
I transferred a working Mac image to the Pi.
$ ./BasiliskII
Basilisk II V1.0 by Christian Bauer et al.
Reading ROM file...
WARNING: Cannot open /dev/cdrom (No such file or directory)
Using SDL/alsa audio output
Using SDL_Renderer driver: opengles2
VOSF acceleration is not profitable on this platform, disabling it
Segmentation fault
There was a mouse cursor on the left of the screen, seems like SDL2 initialized fine.
$ gdb --args ./BasiliskII
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./BasiliskII...done.
(gdb) run
Starting program: /home/pi/development/macemu/BasiliskII/src/Unix/BasiliskII
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Basilisk II V1.0 by Christian Bauer et al.
[New Thread 0xb6b01450 (LWP 652)]
[New Thread 0xb61ff450 (LWP 653)]
[New Thread 0xb59ff450 (LWP 654)]
[New Thread 0xb51ff450 (LWP 655)]
[New Thread 0xb48f5450 (LWP 656)]
Reading ROM file...
WARNING: Cannot open /dev/cdrom (No such file or directory)
[New Thread 0xafdff450 (LWP 657)]
Using SDL/alsa audio output
Using SDL_Renderer driver: opengles2
Thread 1 "BasiliskII" received signal SIGSEGV, Segmentation fault.
video_vosf_profitable (duration_p=0x0, n_page_faults_p=0x0)
at ./../CrossPlatform/video_vosf.h:251
251 addr[0] = 0; // Trigger Screen_fault_handler()
(gdb) print addr
$1 = (uint8 *) 0xaf00a000 ""
I wonder if you have any idea what it was? I was able to compile and run it on my laptop, BTW.
This should, in theory, make it a bit easier to allow the UAE CPU emulation core to be updated, in the future (WinUAE does appear to be updating this, given their releases' notes).
The guest os' display's color is wrong, when using thousands of colors. Elements are usually tinted in a wildly incorrect color.
Steps to reproduce:
Expected result: cursor moves onto host OS display
Observed result: cursor is locked onto guest OS display
I tried prerelease6 in Linux and Mac OS X. Mac runs fine. But I got segfault in Linux
OS: 4.12.9-300.fc26.x86_64
make clean
NO_CONFIGURE=1 ./autogen.sh
./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler --with-x --with-gtk --with-mon=NO
make -j 32
Since your master branch has syntax error, please let me know if you can replicate the issues.
Attempting to switch to a 2 or 4 bit color depth, within a guest copy of Mac OS, currently fails.
After a couple of amendments (mostly path issues to SDL2), I could create a BAII build.
All looks good, when BAII boots System 7 up and installed extensions get listed at the bottom. Just about when the first window should appear, the application terminates.
Here you can study the terminal output:
Basilisk II V1.0 by Christian Bauer et al.
WARNING: Unknown preferences keyword 'keycodes'
WARNING: Unknown preferences keyword 'keycodefile'
WARNING: Unknown preferences keyword 'mousewheelmode'
WARNING: Unknown preferences keyword 'mousewheellines'
WARNING: Unknown preferences keyword 'dsp'
WARNING: Unknown preferences keyword 'mixer'
WARNING: Unknown preferences keyword 'ignoresegv'
Reading ROM file...
Using SDL/coreaudio audio output
Using SDL_Renderer driver: metal
VOSF acceleration is not profitable on this platform, disabling it
WARNING: RmvTime(000ecb12): Descriptor not found
Caught SIGSEGV at address 0x100000014
D0: 00000000 D1: 000000b2 D2: 0000000a D3: 00010001
D4: 05d46570 D5: 00007faa D6: eb37fe48 D7: 00007ffe
A0: 000c4114 A1: 0013e056 A2: 049c907d A3: 00000001
A4: 05d46570 A5: 00007faa A6: eb37fe98 A7: 001fc792
USP=00000000 ISP=001fc792 MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=1 V=0 C=0 IMASK=0
FP0: 0 FP1: 0 FP2: 0 FP3: 0
FP4: 0 FP5: 0 FP6: 0 FP7: 0
N=0 Z=0 I=0 NAN=0
0013de1e: 712f 4e74 0010 0000 0008 EMULOP.L #$0000002f
next PC: 0013de20
Any suggestion or idea how I could get this fixed?
Maybe also the keycode file?
Thanks for your great work & Best,
-Pete
I used GNU automake build
cd macemu/BasiliskII/src/Unix/
make clean
NO_CONFIGURE=1 ./autogen.sh
./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler --with-x --with-gtk
make -j 32
Run
./BasiliskII
It brings up a blank preference UI. What's the worse -- it delete my preference file under ~/.basilisk_ii_prefs.
A user on the http://emaculation.com forums reported that Prerelease 3 crashed for them, on their Windows 10 machine.
Via http://www.emaculation.com/forum/viewtopic.php?f=6&t=9423 ,
"The windows build just shuts down for me - open it, it closes.
Using Windows 10 64b - just dropped you version over my old working one."
While doing testing for Linux, it was noticed that the SDL2 backend could be slow, if and when:
Steps to reproduce:
Expected behavior: the guest OS' menu bar does not move
Actual behavior: the guest OS' menu bar moves, in concert with the cursor's motion
Notes:
Steps to reproduce:
Expected result: the mouse cursor moves to each corner of the guest-OS' screen
Observed result: the mouse cursor does not move outside of a sub-rect, within the guest-OS' screen, and is unable to reach all of the screen's corners
A request came up on the main, macemu repository, to keep the SDL 1.x code in-place, for the time being.
To-do, among other things:
It was noted via cebix#118, that PowerPC + OS X SDL 2 may only be compatible with SDL 2.0.3.
Attempt to be source-compatible with SDL 2.0.3's API, if and where possible and not overly prohibitive.
Some SDL_Surface-creation functions are getting used that, IIRC, were introduced past 2.0.0's release. These are convenient, but probably are not strictly necessary, at this time.
Most of the CPU time spent, in a large (1440x900), full-screen session, on a Release OS X build, appears to be spent doing 68k emulation. Look into using JIT.
To also consider: this may be host CPU cache misses, in which case, JIT might not help.
Building macemu SDL2 in 32 bits lead to a screen with only half of the pixel drawn on screen. One vertical strip of pixel, one vertical strip of black.
Duno how to paste a picture, here
Hello, I posted a report on the emaculation forum:
https://www.emaculation.com/forum/viewtopic.php?f=6&t=9423&p=58315#p58315
and thought it might be best to create an issue here. Briefly, I can't get the --config option to work when I launch your BasiliskII unix executable (in macOS High Sierra). Probably I'm doing something wrong, but if there's something in your code that would fix this, I'll be very glad to hear about it.
Use SDL2's aspect-ratio preserving APIs when scaling the guest OS' screen, onto the host OS' display, in order to help prevent visual distortion..
Build commit 4e5e337 (tag: sdl2-prerelease7) through autotools in Mac OS X. It failed:
make
g++ -I../MacOSX -I./../include -I./. -I. -I./../CrossPlatform -I./../uae_cpu -I./../slirp -DHAVE_CONFIG_H -DOS_darwin -DUNALIGNED_PROFITABLE -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS -DFPU_IEEE -D_REENTRANT -DDATADIR=\"/usr/local/share/BasiliskII\" -g -O2 -D_THREAD_SAFE -I/opt/local/include/SDL2 -I/opt/local/include -fno-merge-constants -fno-gcse-sm -mdynamic-no-pic -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -c ./../SDL/video_sdl2.cpp -o obj/video_sdl2.o
clang: warning: optimization flag '-fno-merge-constants' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fno-gcse-sm' is not supported [-Wignored-optimization-argument]
./../SDL/video_sdl2.cpp:782:29: error: expected expression
sdl_update_video_rect = {0,0,0,0};
^
./../SDL/video_sdl2.cpp:890:29: error: expected expression
sdl_update_video_rect = {0,0,0,0};
^
2 errors generated.
make: *** [obj/video_sdl2.o] Error 1
On Linux, the displaycolordepth parameter exists, but specifying it in .basilisk_ii_prefs or in the command line appears to have no effect. For example, specifying displaycolordepth 8 should result in the emulated Mac having 256 colours, but it has millions of colours as though it was left unspecified.
This would be useful for some games that require 256 colours or display a warning, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.