Git Product home page Git Product logo

macemu's People

Contributors

amade avatar asvitkine avatar atmaxinger avatar atsampson avatar b- avatar bekenn avatar bvarner avatar charlesjs avatar clehner avatar davidludwig avatar dbrant avatar dmac100 avatar dougg3 avatar dsumorok avatar kallisti5 avatar karelbilek avatar landonf avatar masaq- avatar pulkomandy avatar rickyzhang82 avatar rizhansas avatar vasi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

voent

macemu's Issues

International Keyboard

With SDL2 port, using something else than a QWERTY mac keyboard is not usable..... Seems that keyboard definition file do not work.

BasiliskII: running an autotools build breaks ability to build with Xcode

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.

BasiliskII, Win32: resizing a window does not stretch screen

Steps to reproduce:

  1. launch BasiliskII in windowed mode
  2. resize window

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!

Basilisk II: on OS X host, System 7.5.5 can be very slow to boot

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

[Discussion] Can SDLV1 handle BW 1 bpp source frame

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

  1. Screen size is 512x342
  2. Black and White -- 1 bit per pixel
  3. For Macintosh with 24bit ROM, it has 4MB memory limit. Buffer memory patch make it stays in the last page of memory, which is not hard coded address a0000000.
  4. The patch make drawing works in X11 but not SDL.

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 

BasiliskII: resized window's size is not retained, after video mode switch

Steps to reproduce:

  1. launch app in windowed mode
  2. resize the host OS' window (i.e. the Basilisk II window), observing that guest OS screen stretches, accordingly
  3. change resolution in guest OS, such as via the Monitors Control Panel, in System 7.x

Expected result: host OS window remains the same size

Observed result: guest OS window reverts to un-resized size

Integer scaling

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.

Segfault on Raspberry Pi

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.

Basilisk II: on multi-monitor OS X host: cursor can get locked to fullscreen display for guest OS

Steps to reproduce:

  1. on a host OS with 2+ monitors, launch Basilisk II into windowed mode
  2. use OS X 'zoom' button (in Basilisk II window's title bar) to make app fullscreen
  3. observe that Basilisk II goes fullscreen, on that monitor, and that the other monitors continue displaying host OS content
  4. attempt to move mouse cursor outside of Basilisk II, into host OS' display

Expected result: cursor moves onto host OS display

Observed result: cursor is locked onto guest OS display

Segfault in Linux

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.

System fails to launch after ported to Xcode 11.3 and Catalina

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

GTK preference UI was broken in both Linux and Mac OS X

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.

Slow Performance in VirtualBox

While doing testing for Linux, it was noticed that the SDL2 backend could be slow, if and when:

  1. running in a VirtualBox VM
  2. using the "opengl" SDL_Renderer backend. Using the "software" renderer could alleviate this, in some cases.

BasiliskII: on OS X, display can slide around if initial clicks are near top of screen

Steps to reproduce:

  1. setup a fullscreen display in the .basilisk_ii_prefs file, on an OS X host
  2. launch Basilisk II
  3. wait for guest OS to launch
  4. move the cursor almost to the top of the screen, but not at the very top (due to Issue #5, the cursor has to be slightly off from the top)
  5. click and hold down the mouse's primary button
  6. move the mouse downward, keeping the mouse's primary button, pressed

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:

  • clicking anywhere in the mid, or lower parts of the screen beforehand, prevents this bug from reproducing
  • this may, potentially, be a bug in SDL itself, but I am uncertain of this.

Basilisk II: on OS X host, mouse can get locked to portion of fullscreen display

Steps to reproduce:

  1. launch Basilisk II in windowed mode, with a window smaller than the host OS desktop's screen.
  2. press Ctrl + F5 to grab the mouse
  3. press Ctrl + Enter to switch to fullscreen mode
  4. try moving mouse cursor to each corner of the guest-OS' screen

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

Keep SDL 1.x code in place

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:

  • move SDL2-using video code to video_sdl2.cpp
  • restore SDL1 to video_sdl.cpp
  • add compile-time checks for SDL version, to video_sdl*.cpp. (Both SDL 1.x and 2.x have macros that could be used here)
  • make sure audio_sdl.cpp works with SDL 1.x, or split audio backends into two files (audio_sdl2.cpp and audio_sdl.cpp). (A recent change, d5e68ce, switched come SDL audio calls to SDL2 variants.
  • make sure Autotools can work with both SDL 1.x and SDL 2.x.

double-check on SDL 2.0.3 compatibility

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.

BasiliskII: research availability of m68k JIT on x86_64

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.

32 Bits Build: bad screen

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

Compiled failed in Mac OSX for pre-release 7

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

displaycolordepth parameter doesn't seem do anything

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.