Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes aimed at fixing msys builds. #77

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d095637
Replaced old Unix paths with new CrossPlatform paths.
Bekenn Aug 10, 2015
034b700
Updated config.guess and config.sub with newer official GNU versions.
Bekenn Aug 10, 2015
2e0a451
Require C++11 support (Windows builds only).
Bekenn Aug 13, 2015
6636602
Resolved name conflict.
Bekenn Aug 13, 2015
f194dab
Removed -mno-cygwin options; modern compilers, which are required for…
Bekenn Aug 13, 2015
8892201
Explicitly disable Windows min/max #defines when building for C++.
Bekenn Aug 13, 2015
417e54a
Fixed enum comparison (different enum types).
Bekenn Aug 15, 2015
ea97393
Don't symlink CrossPlatform sources; reference them directly.
Bekenn Aug 15, 2015
8d5608d
Use std::min instead of Windows min.
Bekenn Aug 15, 2015
842d8be
Fixed redefinition warnings.
Bekenn Aug 15, 2015
30ee3db
Don't use register keyword (deprecated in C++11).
Bekenn Aug 15, 2015
48615bf
Resolved operator precedence warnings.
Bekenn Aug 15, 2015
8b975c5
Removed explicit calling convention.
Bekenn Aug 15, 2015
125a0c7
Added ignore patterns.
Bekenn Aug 15, 2015
17c9681
Added casts to convert between int and pointer (HANDLE).
Bekenn Aug 15, 2015
7e94b9b
No more ATTRIBUTE_PACKED.
Bekenn Aug 15, 2015
1491969
String literals are constants.
Bekenn Aug 15, 2015
90bd9b9
Use system default cc and c++ instead of assuming gcc and g++.
Bekenn Aug 16, 2015
2735ff9
Disable switch warning when building with clang.
Bekenn Aug 16, 2015
bab497c
Fixed bitwise operation (& instead of &&).
Bekenn Aug 16, 2015
4be2c55
Fixed printf format specifier.
Bekenn Aug 16, 2015
4d146e9
scsi scatter/gather table entry type changed from uint* to void*
Bekenn Aug 20, 2015
f06b772
Restored compatibility with pre-Vista operating systems.
Bekenn Aug 20, 2015
0364844
Always build CDEnable sources.
Bekenn Aug 21, 2015
d79a73e
Host compiler uses target compiler CFLAGS/CXXFLAGS; not ideal, but I …
Bekenn Aug 21, 2015
90eeef2
Struct my_stat is now compatible with mingw struct stat.
Bekenn Aug 21, 2015
631bade
Const-correct assignment from string literal.
Bekenn Aug 21, 2015
d93680f
Replaced integral *BaseDiff with pointer *Base, which eliminates a la…
Bekenn Aug 21, 2015
0f16cf2
Removed unneeded #include.
Bekenn Aug 21, 2015
8fc22eb
Always use normal calling convention on Windows.
Bekenn Aug 21, 2015
aae928c
Got rid of more casts, fixed more warnings...
Bekenn Aug 21, 2015
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@

# Mac OS X metadata
*.DS_Store

# Generated files
Makefile
aclocal.m4
autom4te.cache
config.h.in
config.log
config.status
configure
4 changes: 2 additions & 2 deletions BasiliskII/src/AmigaOS/main_amiga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ int main(int argc, char **argv)
QuitEmulator();
}
}
RAMBaseMac = (uint32)RAMBaseHost;
RAMBaseMac = (uaecptr)RAMBaseHost;
D(bug("Mac RAM starts at %08lx\n", RAMBaseHost));
ROMBaseHost = RAMBaseHost + RAMSize;
ROMBaseMac = (uint32)ROMBaseHost;
ROMBaseMac = (uaecptr)ROMBaseHost;
D(bug("Mac ROM starts at %08lx\n", ROMBaseHost));

// Get rom file path from preferences
Expand Down
2 changes: 1 addition & 1 deletion BasiliskII/src/AmigaOS/scsi_amiga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ bool scsi_set_target(int id, int lun)
* read/write data according to S/G table (returns false on error); timeout is in 1/60 sec
*/

bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, uint8 **sg_ptr, uint32 *sg_len, uint16 *stat, uint32 timeout)
bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, void* const* sg_ptr, uint32* sg_len, uint16* stat, uint32 timeout)
{
// Bypass the buffer if there's only one S/G table entry
bool do_direct_transfer = (sg_size == 1 && ((uint32)sg_ptr[0] & 1) == 0 && direct_transfers_supported);
Expand Down
2 changes: 1 addition & 1 deletion BasiliskII/src/BeOS/scsi_beos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ bool scsi_set_target(int id, int lun)
* read/write data according to S/G table (returns false on error); timeout is in 1/60 sec
*/

bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, uint8 **sg_ptr, uint32 *sg_len, uint16 *stat, uint32 timeout)
bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, void* const* sg_ptr, uint32* sg_len, uint16* stat, uint32 timeout)
{
// Check if buffer is large enough, allocate new buffer if needed
if (!try_buffer(data_length)) {
Expand Down
24 changes: 12 additions & 12 deletions BasiliskII/src/BeOS/sysdeps.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ extern void Delay_usec(uint32 usec);

// Intel x86 assembler optimizations
#define X86_PPRO_OPT
static inline uae_u32 do_get_mem_long(uae_u32 *a) {uint32 retval; __asm__ ("bswap %0" : "=r" (retval) : "0" (*a) : "cc"); return retval;}
static inline uae_u32 do_get_mem_long(const void* a) {uint32 retval; __asm__ ("bswap %0" : "=r" (retval) : "0" (*a) : "cc"); return retval;}
#ifdef X86_PPRO_OPT
static inline uae_u32 do_get_mem_word(uae_u16 *a) {uint32 retval; __asm__ ("movzwl %w1,%k0\n\tshll $16,%k0\n\tbswap %k0\n" : "=&r" (retval) : "m" (*a) : "cc"); return retval;}
static inline uae_u32 do_get_mem_word(const void* a) {uint32 retval; __asm__ ("movzwl %w1,%k0\n\tshll $16,%k0\n\tbswap %k0\n" : "=&r" (retval) : "m" (*a) : "cc"); return retval;}
#else
static inline uae_u32 do_get_mem_word(uae_u16 *a) {uint32 retval; __asm__ ("xorl %k0,%k0\n\tmovw %w1,%w0\n\trolw $8,%w0" : "=&r" (retval) : "m" (*a) : "cc"); return retval;}
static inline uae_u32 do_get_mem_word(const void* a) {uint32 retval; __asm__ ("xorl %k0,%k0\n\tmovw %w1,%w0\n\trolw $8,%w0" : "=&r" (retval) : "m" (*a) : "cc"); return retval;}
#endif
#define HAVE_GET_WORD_UNSWAPPED
#define do_get_mem_word_unswapped(a) ((uae_u32)*((uae_u16 *)(a)))
static inline void do_put_mem_long(uae_u32 *a, uae_u32 v) {__asm__ ("bswap %0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
static inline void do_put_mem_long(void* a, uae_u32 v) {__asm__ ("bswap %0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
#ifdef X86_PPRO_OPT
static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("bswap %0" : "=&r" (v) : "0" (v << 16) : "cc"); *a = v;}
static inline void do_put_mem_word(void* a, uae_u32 v) {__asm__ ("bswap %0" : "=&r" (v) : "0" (v << 16) : "cc"); *a = v;}
#else
static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
static inline void do_put_mem_word(void* a, uae_u32 v) {__asm__ ("rolw $8,%0" : "=r" (v) : "0" (v) : "cc"); *a = v;}
#endif

#define X86_ASSEMBLY
Expand All @@ -114,10 +114,10 @@ static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("rolw $8,%0"
#else

// PowerPC (memory.cpp not used, so no optimization neccessary)
static inline uae_u32 do_get_mem_long(uae_u32 *a) {return *a;}
static inline uae_u32 do_get_mem_word(uae_u16 *a) {return *a;}
static inline void do_put_mem_long(uae_u32 *a, uae_u32 v) {*a = v;}
static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {*a = v;}
static inline uae_u32 do_get_mem_long(const void* a) {return *(const uae_u32*)a;}
static inline uae_u32 do_get_mem_word(const void* a) {return *(const uae_u16*)a;}
static inline void do_put_mem_long(void* a, uae_u32 v) {*(uae_u32*)a = v;}
static inline void do_put_mem_word(void* a, uae_u32 v) {*(uae_u16*)a = v;}

#undef X86_ASSEMBLY
#define UNALIGNED_PROFITABLE
Expand All @@ -126,8 +126,8 @@ static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {*a = v;}
#define REGPARAM
#endif

#define do_get_mem_byte(a) ((uae_u32)*((uae_u8 *)(a)))
#define do_put_mem_byte(a, v) (*(uae_u8 *)(a) = (v))
#define do_get_mem_byte(a) ((uae_u32)*((const uae_u8*)(a)))
#define do_put_mem_byte(a, v) (*(uae_u8*)(a) = (v))

#define call_mem_get_func(func, addr) ((*func)(addr))
#define call_mem_put_func(func, addr, v) ((*func)(addr, v))
Expand Down
2 changes: 1 addition & 1 deletion BasiliskII/src/SDL/video_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ static void update_display_static(driver_base *drv)

// Check for first column from left and first column from right that have changed
if (high) {
if (VIDEO_MODE_DEPTH < VIDEO_DEPTH_8BIT) {
if ((int)VIDEO_MODE_DEPTH < VIDEO_DEPTH_8BIT) {
const int src_bytes_per_row = bytes_per_row;
const int dst_bytes_per_row = drv->s->pitch;
const int pixels_per_byte = VIDEO_MODE_X / src_bytes_per_row;
Expand Down
6 changes: 3 additions & 3 deletions BasiliskII/src/Unix/FreeBSD/scsi_freebsd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static bool try_buffer(int size)
return true;
}

bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, uint8 **sg_ptr, uint32 *sg_len, uint16 *stat, uint32 timeout)
bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, void* const* sg_ptr, uint32* sg_len, uint16* stat, uint32 timeout)
{
int value = 0;
#ifdef CAM
Expand Down Expand Up @@ -730,9 +730,9 @@ bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, uint8 **sg_ptr
static char line[16];
for(int r=0, x=0;x<len;x++) {
if(x!=0&&x%16==0) { D(bug("%s\n", line)); r = 0; }
line[r++] = isprint(sg_ptr[i][x])?sg_ptr[i][x]:'.';
line[r++] = isprint(((uint8*)sg_ptr[i])[x])?((uint8*)sg_ptr[i])[x]:'.';
line[r] = 0;
D(bug("%02x ", sg_ptr[i][x]));
D(bug("%02x ", (uint8*)(sg_ptr[i])[x]));
}
#endif /* VERBOSE_CAM_DEBUG */
#endif /* CAM */
Expand Down
2 changes: 1 addition & 1 deletion BasiliskII/src/Unix/Linux/scsi_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ bool scsi_set_target(int id, int lun)
* read/write data according to S/G table (returns false on error); timeout is in 1/60 sec
*/

bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, uint8 **sg_ptr, uint32 *sg_len, uint16 *stat, uint32 timeout)
bool scsi_send_cmd(size_t data_length, bool reading, int sg_size, void* const* sg_ptr, uint32* sg_len, uint16* stat, uint32 timeout)
{
static int pack_id = 0;

Expand Down
Loading