mirror of
https://github.com/holub/mame
synced 2025-06-07 21:33:45 +03:00
MAME 0.233
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0DYtsBhE4EM627+6wXSxAYxAcQ4FAmDcdEoACgkQwXSxAYxA cQ7dsxAAkKnl71MHAZ9E3mOTUrcTMvDp6eQIJOkiaUx7ZBprM5Pnf8JLrcvxXtMY 8Asy2X/87msvBZlXqpHeHAuQHfCONF/KiZF48zMYvnBGghgD73flBTBISag0K2+B gaaVyekcE8QC1ZnWk0HwounEfKSG6GPCk0n/GIst4hhcUhf6uxEg+f6uJteRiHqu /Aa42OLljNVRXrcpnsz0rlDvNHe4LQoki/r/9Z3mWlwNYnphC6sPJt+lFCrYD8ge NF7vSdn8Ivo2NEustEt9t6HGG+jOiKcJaIZGkaqTbnniIv1aBU9WzAIrTA4htg4z 8kQYkiUUaTYX/F5u/C3q3GwuGoHxn423VapIxk8wX2fWirLSTcpbjXzFSkim/eum b5FHrYsGrK3gSffr640SGrDHIZABvJIjQ4r13P20ilFZVyvRun7j/S4we4cxrEkR baKwk5beHLRsMTwkSZmhO+g1fDmXgwwhWZiqhk2beEgviEqSO+1geDjDSLkp8tnW deaVAqYSiZMtaCywwmlsg14Xv2zYpiLBzvUaUTr9tw86Yd4z1ij6dGX9jYI5s0fe PLs4ozZIbwbR0DQhAvdUINzQs537jSefU2hm6HLMPoNoPnpGr9T3FHQtDDyYCk/t Mp3Ayw5V8PJNEOcX5ZzXyWv5paqlT70V21M3QyKwm1zPHA9fsYI= =gV5o -----END PGP SIGNATURE----- Merge tag 'mame0233' into mainline-master MAME 0.233
This commit is contained in:
commit
3dcc095e86
@ -4,8 +4,8 @@
|
|||||||
-->
|
-->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.mamedev.mame"
|
package="org.mamedev.mame"
|
||||||
android:versionCode="232"
|
android:versionCode="233"
|
||||||
android:versionName="0.232"
|
android:versionName="0.233"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<!-- OpenGL ES 2.0 -->
|
<!-- OpenGL ES 2.0 -->
|
||||||
|
@ -688,7 +688,7 @@ license:CC0
|
|||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="freedos13rc4_120" cloneof="freedos13rc4">
|
<software name="freedos13rc4_120" cloneof="freedos13rc4">
|
||||||
<description>FreeDOS 1.3 Release Candidate 4 (Floppy-Only Edition, 5.25" 1.2mb)</description>
|
<description>FreeDOS 1.3 Release Candidate 4 (Floppy-Only Edition, 5.25" 1.2MB)</description>
|
||||||
<year>2021</year>
|
<year>2021</year>
|
||||||
<publisher>The FreeDOS Project</publisher>
|
<publisher>The FreeDOS Project</publisher>
|
||||||
<info name="version" value="1.3-RC4"/>
|
<info name="version" value="1.3-RC4"/>
|
||||||
@ -755,7 +755,7 @@ license:CC0
|
|||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="freedos13rc4_144" cloneof="freedos13rc4">
|
<software name="freedos13rc4_144" cloneof="freedos13rc4">
|
||||||
<description>FreeDOS 1.3 Release Candidate 4 (Floppy-Only Edition, 3.5" 1.44m)</description>
|
<description>FreeDOS 1.3 Release Candidate 4 (Floppy-Only Edition, 3.5" 1.44MB)</description>
|
||||||
<year>2021</year>
|
<year>2021</year>
|
||||||
<publisher>The FreeDOS Project</publisher>
|
<publisher>The FreeDOS Project</publisher>
|
||||||
<info name="version" value="1.3-RC4"/>
|
<info name="version" value="1.3-RC4"/>
|
||||||
|
@ -137183,7 +137183,7 @@ license:CC0
|
|||||||
</software>
|
</software>
|
||||||
|
|
||||||
<software name="uchimatab" cloneof="uchimata">
|
<software name="uchimatab" cloneof="uchimata">
|
||||||
<description>Uchi-Mata (IBSA/Erbe, serie leyenda)</description>
|
<description>Uchi-Mata (IBSA/Erbe, Serie Leyenda)</description>
|
||||||
<year>1988</year>
|
<year>1988</year>
|
||||||
<publisher>IBSA/Erbe Software</publisher>
|
<publisher>IBSA/Erbe Software</publisher>
|
||||||
<part name="cass" interface="spectrum_cass">
|
<part name="cass" interface="spectrum_cass">
|
||||||
|
4
makefile
4
makefile
@ -1760,14 +1760,14 @@ endif
|
|||||||
|
|
||||||
ifeq (posix,$(SHELLTYPE))
|
ifeq (posix,$(SHELLTYPE))
|
||||||
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
|
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
|
||||||
@echo '#define BARE_BUILD_VERSION "0.232"' > $@
|
@echo '#define BARE_BUILD_VERSION "0.233"' > $@
|
||||||
@echo 'extern const char bare_build_version[];' >> $@
|
@echo 'extern const char bare_build_version[];' >> $@
|
||||||
@echo 'extern const char build_version[];' >> $@
|
@echo 'extern const char build_version[];' >> $@
|
||||||
@echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@
|
@echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@
|
||||||
@echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@
|
@echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@
|
||||||
else
|
else
|
||||||
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
|
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
|
||||||
@echo #define BARE_BUILD_VERSION "0.232" > $@
|
@echo #define BARE_BUILD_VERSION "0.233" > $@
|
||||||
@echo extern const char bare_build_version[]; >> $@
|
@echo extern const char bare_build_version[]; >> $@
|
||||||
@echo extern const char build_version[]; >> $@
|
@echo extern const char build_version[]; >> $@
|
||||||
@echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@
|
@echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@
|
||||||
|
@ -1899,6 +1899,7 @@ files {
|
|||||||
MAME_DIR .. "src/mame/machine/lynx.cpp",
|
MAME_DIR .. "src/mame/machine/lynx.cpp",
|
||||||
MAME_DIR .. "src/mame/drivers/pofo.cpp",
|
MAME_DIR .. "src/mame/drivers/pofo.cpp",
|
||||||
MAME_DIR .. "src/mame/machine/pofo_kbd.cpp",
|
MAME_DIR .. "src/mame/machine/pofo_kbd.cpp",
|
||||||
|
MAME_DIR .. "src/mame/machine/pofo_kbd.h",
|
||||||
MAME_DIR .. "src/mame/drivers/tvboy.cpp",
|
MAME_DIR .. "src/mame/drivers/tvboy.cpp",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
#include "jerror.h"
|
#include "jerror.h"
|
||||||
|
|
||||||
|
#include <csetjmp>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -113,6 +116,18 @@ void jpeg_corefile_source::source(j_decompress_ptr cinfo, util::core_file &file)
|
|||||||
src->next_input_byte = nullptr;
|
src->next_input_byte = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct jpeg_setjmp_error_mgr : public jpeg_error_mgr
|
||||||
|
{
|
||||||
|
jpeg_setjmp_error_mgr()
|
||||||
|
{
|
||||||
|
jpeg_std_error(this);
|
||||||
|
error_exit = [] (j_common_ptr cinfo) { std::longjmp(static_cast<jpeg_setjmp_error_mgr *>(cinfo->err)->m_jump_buffer, 1); };
|
||||||
|
}
|
||||||
|
|
||||||
|
std::jmp_buf m_jump_buffer;
|
||||||
|
};
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
@ -672,14 +687,22 @@ void render_load_jpeg(bitmap_argb32 &bitmap, util::core_file &file)
|
|||||||
// deallocate previous bitmap
|
// deallocate previous bitmap
|
||||||
bitmap.reset();
|
bitmap.reset();
|
||||||
|
|
||||||
// create a JPEG source for the file
|
// set up context for error handling
|
||||||
jpeg_decompress_struct cinfo;
|
jpeg_decompress_struct cinfo;
|
||||||
jpeg_error_mgr jerr;
|
jpeg_setjmp_error_mgr jerr;
|
||||||
cinfo.err = jpeg_std_error(&jerr);
|
cinfo.err = &jerr;
|
||||||
jerr.error_exit = [] (j_common_ptr cinfo) { throw cinfo->err; };
|
|
||||||
JSAMPARRAY buffer = nullptr;
|
JSAMPARRAY buffer = nullptr;
|
||||||
try
|
int w, h, s, row_stride, j, i;
|
||||||
|
if (setjmp(jerr.m_jump_buffer)) // setjmp must be used in control expression
|
||||||
{
|
{
|
||||||
|
char msg[1024];
|
||||||
|
(cinfo.err->format_message)(reinterpret_cast<j_common_ptr>(&cinfo), msg);
|
||||||
|
osd_printf_error("JPEG error reading data from file: %s\n", msg);
|
||||||
|
bitmap.reset();
|
||||||
|
goto cleanup; // use goto to ensure longjmp can't cross an initialisation
|
||||||
|
}
|
||||||
|
|
||||||
|
// create a JPEG source for the file
|
||||||
jpeg_create_decompress(&cinfo);
|
jpeg_create_decompress(&cinfo);
|
||||||
cinfo.mem->max_memory_to_use = 128 * 1024 * 1024;
|
cinfo.mem->max_memory_to_use = 128 * 1024 * 1024;
|
||||||
jpeg_corefile_source::source(&cinfo, file);
|
jpeg_corefile_source::source(&cinfo, file);
|
||||||
@ -689,31 +712,31 @@ void render_load_jpeg(bitmap_argb32 &bitmap, util::core_file &file)
|
|||||||
jpeg_start_decompress(&cinfo);
|
jpeg_start_decompress(&cinfo);
|
||||||
|
|
||||||
// allocates the destination bitmap
|
// allocates the destination bitmap
|
||||||
int w = cinfo.output_width;
|
w = cinfo.output_width;
|
||||||
int h = cinfo.output_height;
|
h = cinfo.output_height;
|
||||||
int s = cinfo.output_components;
|
s = cinfo.output_components;
|
||||||
bitmap.allocate(w, h);
|
bitmap.allocate(w, h);
|
||||||
|
|
||||||
// allocates a buffer to receive the information and copy them into the bitmap
|
// allocates a buffer to receive the information and copy them into the bitmap
|
||||||
int row_stride = cinfo.output_width * cinfo.output_components;
|
row_stride = cinfo.output_width * cinfo.output_components;
|
||||||
JSAMPARRAY buffer = reinterpret_cast<JSAMPARRAY>(malloc(sizeof(JSAMPROW)));
|
buffer = reinterpret_cast<JSAMPARRAY>(std::malloc(sizeof(JSAMPROW)));
|
||||||
buffer[0] = reinterpret_cast<JSAMPROW>(malloc(sizeof(JSAMPLE) * row_stride));
|
buffer[0] = reinterpret_cast<JSAMPROW>(std::malloc(sizeof(JSAMPLE) * row_stride));
|
||||||
|
|
||||||
while (cinfo.output_scanline < cinfo.output_height)
|
while (cinfo.output_scanline < cinfo.output_height)
|
||||||
{
|
{
|
||||||
int j = cinfo.output_scanline;
|
j = cinfo.output_scanline;
|
||||||
jpeg_read_scanlines(&cinfo, buffer, 1);
|
jpeg_read_scanlines(&cinfo, buffer, 1);
|
||||||
|
|
||||||
if (s == 1)
|
if (s == 1)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < w; ++i)
|
for (i = 0; i < w; ++i)
|
||||||
bitmap.pix(j, i) = rgb_t(0xFF, buffer[0][i], buffer[0][i], buffer[0][i]);
|
bitmap.pix(j, i) = rgb_t(0xff, buffer[0][i], buffer[0][i], buffer[0][i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (s == 3)
|
else if (s == 3)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < w; ++i)
|
for (i = 0; i < w; ++i)
|
||||||
bitmap.pix(j, i) = rgb_t(0xFF, buffer[0][i * s], buffer[0][i * s + 1], buffer[0][i * s + 2]);
|
bitmap.pix(j, i) = rgb_t(0xff, buffer[0][i * s], buffer[0][i * s + 1], buffer[0][i * s + 2]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -723,22 +746,15 @@ void render_load_jpeg(bitmap_argb32 &bitmap, util::core_file &file)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// finish decompression and frees the memory
|
// finish decompression and free the memory
|
||||||
jpeg_finish_decompress(&cinfo);
|
jpeg_finish_decompress(&cinfo);
|
||||||
}
|
cleanup:
|
||||||
catch (jpeg_error_mgr *)
|
|
||||||
{
|
|
||||||
char msg[1024];
|
|
||||||
(cinfo.err->format_message)(reinterpret_cast<j_common_ptr>(&cinfo), msg);
|
|
||||||
osd_printf_error("JPEG error reading data from file: %s\n", msg);
|
|
||||||
bitmap.reset();
|
|
||||||
}
|
|
||||||
jpeg_destroy_decompress(&cinfo);
|
jpeg_destroy_decompress(&cinfo);
|
||||||
if (buffer)
|
if (buffer)
|
||||||
{
|
{
|
||||||
if (buffer[0])
|
if (buffer[0])
|
||||||
free(buffer[0]);
|
std::free(buffer[0]);
|
||||||
free(buffer);
|
std::free(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -917,18 +933,21 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const util::png_info
|
|||||||
ru_imgformat render_detect_image(util::core_file &file)
|
ru_imgformat render_detect_image(util::core_file &file)
|
||||||
{
|
{
|
||||||
// PNG: check for valid header
|
// PNG: check for valid header
|
||||||
|
{
|
||||||
util::png_error const png = util::png_info::verify_header(file);
|
util::png_error const png = util::png_info::verify_header(file);
|
||||||
file.seek(0, SEEK_SET);
|
file.seek(0, SEEK_SET);
|
||||||
if (util::png_error::NONE == png)
|
if (util::png_error::NONE == png)
|
||||||
return RENDUTIL_IMGFORMAT_PNG;
|
return RENDUTIL_IMGFORMAT_PNG;
|
||||||
|
}
|
||||||
|
|
||||||
// JPEG: attempt to read header with libjpeg
|
// JPEG: attempt to read header with libjpeg
|
||||||
jpeg_decompress_struct cinfo;
|
|
||||||
jpeg_error_mgr jerr;
|
|
||||||
cinfo.err = jpeg_std_error(&jerr);
|
|
||||||
jerr.error_exit = [] (j_common_ptr cinfo) { throw cinfo->err; };
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
|
jpeg_decompress_struct cinfo;
|
||||||
|
jpeg_setjmp_error_mgr jerr;
|
||||||
|
cinfo.err = &jerr;
|
||||||
|
if (setjmp(jerr.m_jump_buffer)) // setjmp must be used in control expression
|
||||||
|
goto notjpeg; // use goto to ensure longjmp can't cross an initialisation
|
||||||
|
|
||||||
jpeg_create_decompress(&cinfo);
|
jpeg_create_decompress(&cinfo);
|
||||||
cinfo.mem->max_memory_to_use = 128 * 1024 * 1024;
|
cinfo.mem->max_memory_to_use = 128 * 1024 * 1024;
|
||||||
jpeg_corefile_source::source(&cinfo, file);
|
jpeg_corefile_source::source(&cinfo, file);
|
||||||
@ -936,18 +955,19 @@ ru_imgformat render_detect_image(util::core_file &file)
|
|||||||
jpeg_destroy_decompress(&cinfo);
|
jpeg_destroy_decompress(&cinfo);
|
||||||
file.seek(0, SEEK_SET);
|
file.seek(0, SEEK_SET);
|
||||||
return RENDUTIL_IMGFORMAT_JPEG;
|
return RENDUTIL_IMGFORMAT_JPEG;
|
||||||
}
|
|
||||||
catch (jpeg_error_mgr *)
|
notjpeg:
|
||||||
{
|
|
||||||
jpeg_destroy_decompress(&cinfo);
|
jpeg_destroy_decompress(&cinfo);
|
||||||
file.seek(0, SEEK_SET);
|
file.seek(0, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Microsoft DIB: check for valid header
|
// Microsoft DIB: check for valid header
|
||||||
|
{
|
||||||
util::msdib_error const msdib = util::msdib_verify_header(file);
|
util::msdib_error const msdib = util::msdib_verify_header(file);
|
||||||
file.seek(0, SEEK_SET);
|
file.seek(0, SEEK_SET);
|
||||||
if (util::msdib_error::NONE == msdib)
|
if (util::msdib_error::NONE == msdib)
|
||||||
return RENDUTIL_IMGFORMAT_MSDIB;
|
return RENDUTIL_IMGFORMAT_MSDIB;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: add more as necessary
|
// TODO: add more as necessary
|
||||||
return RENDUTIL_IMGFORMAT_UNKNOWN;
|
return RENDUTIL_IMGFORMAT_UNKNOWN;
|
||||||
|
Loading…
Reference in New Issue
Block a user