diff --git a/Src/1541d64.cpp b/Src/1541d64.cpp index 55ed190..0dbe134 100644 --- a/Src/1541d64.cpp +++ b/Src/1541d64.cpp @@ -185,7 +185,7 @@ bool ImageDrive::change_image(const char *path) // Determine file type and fill in image_file_desc structure if (!parse_image_file(the_file, desc)) { fclose(the_file); - the_file = false; + the_file = NULL; return false; } diff --git a/Src/SID.cpp b/Src/SID.cpp index a0bcfd5..54a0075 100644 --- a/Src/SID.cpp +++ b/Src/SID.cpp @@ -330,7 +330,7 @@ private: static const uint16 TriSawRectTable[0x100]; static const uint32 EGTable[16]; // Increment/decrement values for all A/D/R settings static const uint8 EGDRShift[256]; // For exponential approximation of D/R - static const int16 SampleTab[16]; // Table for sampled voice + static const uint16 SampleTab[16]; // Table for sampled voice DRVoice voice[3]; // Data for 3 voices @@ -682,7 +682,7 @@ const uint8 DigitalRenderer::EGDRShift[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -const int16 DigitalRenderer::SampleTab[16] = { +const uint16 DigitalRenderer::SampleTab[16] = { 0x8000, 0x9111, 0xa222, 0xb333, 0xc444, 0xd555, 0xe666, 0xf777, 0x0888, 0x1999, 0x2aaa, 0x3bbb, 0x4ccc, 0x5ddd, 0x6eee, 0x7fff, }; diff --git a/Src/main.cpp b/Src/main.cpp index 2bc8b88..c02987a 100644 --- a/Src/main.cpp +++ b/Src/main.cpp @@ -134,7 +134,7 @@ bool InitNetwork() memset(myIP, 0, sizeof(myIP)); printf("Getting IP address via DHCP...\n\n"); - if (if_config(myIP, NULL, NULL, true) < 0) { + if (if_config(myIP, NULL, NULL, true, 10) < 0) { printf("No DHCP reply\n\n"); return false; } diff --git a/Src/sysdeps.h b/Src/sysdeps.h index e9a526d..faf8980 100644 --- a/Src/sysdeps.h +++ b/Src/sysdeps.h @@ -134,12 +134,13 @@ typedef int int16; #error No 2 byte type, you lose. #endif -#if SIZEOF_INT == 4 -typedef unsigned int uint32; -typedef int int32; -#elif SIZEOF_LONG == 4 + +#if SIZEOF_LONG == 4 typedef unsigned long uint32; typedef long int32; +#elif SIZEOF_INT == 4 +typedef unsigned int uint32; +typedef int int32; #else #error No 4 byte type, you lose. #endif