mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
xbox_nv2a: better fix for dangling pointer warning,
coleco: remove romhacked bios rom
This commit is contained in:
parent
bd166709fb
commit
e3d45954ad
@ -190,8 +190,8 @@ namespace plib
|
||||
FT v2;
|
||||
do
|
||||
{
|
||||
v1 = normalize_uniform(p, constants<FT>::two(), constants<FT>::one()); // [-1..1[
|
||||
v2 = normalize_uniform(p, constants<FT>::two(), constants<FT>::one()); // [-1..1[
|
||||
v1 = normalize_uniform(p, constants<FT>::two(), constants<FT>::one()); // [-1..1]
|
||||
v2 = normalize_uniform(p, constants<FT>::two(), constants<FT>::one()); // [-1..1]
|
||||
s = v1 * v1 + v2 * v2;
|
||||
} while (s >= constants<FT>::one());
|
||||
if (s == constants<FT>::zero())
|
||||
|
@ -663,11 +663,7 @@ void coleco_state::dina(machine_config &config)
|
||||
|
||||
ROM_START (coleco)
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_SYSTEM_BIOS( 0, "original", "Original" )
|
||||
ROMX_LOAD( "313 10031-4005 73108a.u2", 0x0000, 0x2000, CRC(3aa93ef3) SHA1(45bedc4cbdeac66c7df59e9e599195c778d86a92), ROM_BIOS(0) )
|
||||
ROM_SYSTEM_BIOS( 1, "thick", "Thick characters" )
|
||||
// differences to 0x3aa93ef3 modified characters, added a pad 2 related fix
|
||||
ROMX_LOAD( "colecoa.rom", 0x0000, 0x2000, CRC(39bb16fc) SHA1(99ba9be24ada3e86e5c17aeecb7a2d68c5edfe59), ROM_BIOS(1) )
|
||||
ROM_LOAD( "313_10031-4005_73108a.u2", 0x0000, 0x2000, CRC(3aa93ef3) SHA1(45bedc4cbdeac66c7df59e9e599195c778d86a92) )
|
||||
ROM_END
|
||||
|
||||
/* ONYX (Prototype)
|
||||
|
@ -418,19 +418,19 @@ INPUT_CHANGED_MEMBER(esripsys_state::coin_interrupt)
|
||||
|
||||
static INPUT_PORTS_START( turbosub )
|
||||
PORT_START("KEYPAD_A")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Keypad 0") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Keypad 1") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Keypad 2") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Keypad 3") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Keypad 4") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Keypad 5") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Keypad 0") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Keypad 1") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Keypad 2") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Keypad 3") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Keypad 4") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Keypad 5") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
|
||||
PORT_START("KEYPAD_B")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Keypad 6") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Keypad 7") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Keypad 8") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Keypad 9") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Keypad 6") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Keypad 7") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Keypad 8") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Keypad 9") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") PORT_CHANGED_MEMBER(DEVICE_SELF, esripsys_state,keypad_interrupt, 0)
|
||||
|
||||
PORT_START("COINS")
|
||||
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
|
@ -660,6 +660,8 @@ void vertex_program_simulator::process(int address, vertex_nv *in, vertex_nv *ou
|
||||
output++;
|
||||
count--;
|
||||
}
|
||||
input = nullptr;
|
||||
output = nullptr;
|
||||
}
|
||||
|
||||
int vertex_program_simulator::status()
|
||||
@ -2512,25 +2514,7 @@ void nv2a_renderer::compute_supersample_factors(float &horizontal, float &vertic
|
||||
|
||||
void nv2a_renderer::convert_vertices(vertex_nv *source, nv2avertex_t *destination)
|
||||
{
|
||||
/*
|
||||
FIXME: GCC 13.1 errored this without the static on "vert". I believe this is a real bug, but I don't
|
||||
know enough about what this code is doing to be confident.
|
||||
|
||||
In member function ‘void vertex_program_simulator::set_data(vertex_nv*, vertex_nv*)’,
|
||||
inlined from ‘void vertex_program_simulator::process(int, vertex_nv*, vertex_nv*, int)’ at ../../../../../src/mame/shared/xbox_nv2a.cpp:643:10,
|
||||
inlined from ‘void nv2a_renderer::convert_vertices(vertex_nv*, nv2avertex_t*)’ at ../../../../../src/mame/shared/xbox_nv2a.cpp:2546:29:
|
||||
../../../../../src/mame/shared/xbox_nv2a.cpp:449:16: error: storing the address of local variable ‘vert’ in ‘*&this_144(D)->vertexprogram.exec.vertex_program_simulator::output’ [-Werror=dangling-pointer=]
|
||||
449 | output = out;
|
||||
| ~~~~~~~^~~~~
|
||||
../../../../../src/mame/shared/xbox_nv2a.cpp: In member function ‘void nv2a_renderer::convert_vertices(vertex_nv*, nv2avertex_t*)’:
|
||||
../../../../../src/mame/shared/xbox_nv2a.cpp:2504:19: note: ‘vert’ declared here
|
||||
2522 | vertex_nv vert;
|
||||
| ^~~~
|
||||
../../../../../src/mame/shared/xbox_nv2a.cpp:2502:82: note: ‘this’ declared here
|
||||
2502 | void nv2a_renderer::convert_vertices(vertex_nv *source, nv2avertex_t *destination)
|
||||
| ^
|
||||
*/
|
||||
static vertex_nv vert;
|
||||
vertex_nv vert;
|
||||
int u;
|
||||
float v[4];
|
||||
double c;
|
||||
|
@ -56,10 +56,10 @@ protected:
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
|
||||
uint8_t m_vram_bank_mask;
|
||||
int m_robokid_sprites;
|
||||
uint8_t m_vram_bank_mask = 0;
|
||||
int m_robokid_sprites = 0;
|
||||
bool (*m_stencil_compare_function) (uint16_t pal);
|
||||
int m_sprites_updated;
|
||||
int m_sprites_updated = 0;
|
||||
tilemap_t* m_fg_tilemap;
|
||||
tilemap_t* m_bg_tilemap;
|
||||
bitmap_ind16 m_sprites_bitmap;
|
||||
@ -96,8 +96,8 @@ private:
|
||||
required_memory_bank m_mainbank;
|
||||
|
||||
std::unique_ptr<int16_t[]> m_sampledata;
|
||||
int m_next_sprite_overdraw_enabled;
|
||||
uint8_t m_rom_bank_mask;
|
||||
int m_next_sprite_overdraw_enabled = 0;
|
||||
uint8_t m_rom_bank_mask = 0;
|
||||
|
||||
void draw_sprites( bitmap_ind16 &bitmap);
|
||||
void erase_sprites( bitmap_ind16 &bitmap);
|
||||
@ -145,7 +145,7 @@ protected:
|
||||
template<int Layer> void robokid_bg_videoram_w(offs_t offset, uint8_t data);
|
||||
template<int Layer> void robokid_bg_ctrl_w(offs_t offset, uint8_t data);
|
||||
template<int Layer> void robokid_bg_bank_w(uint8_t data);
|
||||
tilemap_t* m_robokid_tilemap[3]{};
|
||||
tilemap_t* m_robokid_tilemap[3];
|
||||
|
||||
void video_init_banked(uint32_t vram_alloc_size);
|
||||
TILEMAP_MAPPER_MEMBER(robokid_bg_scan);
|
||||
@ -160,7 +160,7 @@ private:
|
||||
uint32_t screen_update_robokid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void motion_error_kludge(uint16_t offset);
|
||||
uint8_t m_robokid_bg_bank[3];
|
||||
uint8_t m_robokid_bg_bank[3] = { };
|
||||
std::unique_ptr<uint8_t[]> m_robokid_bg_videoram[3];
|
||||
};
|
||||
|
||||
@ -196,7 +196,7 @@ private:
|
||||
void io_protection_start();
|
||||
void io_protection_reset();
|
||||
|
||||
uint8_t m_io_protection[3];
|
||||
uint8_t m_io_protection[3] = { };
|
||||
uint8_t m_io_protection_input = 0;
|
||||
int m_io_protection_tick = 0;
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:Uki
|
||||
/*****************************************************************************
|
||||
|
||||
XX Mission (c) 1986 UPL
|
||||
XX Mission (c) 1986 UPL
|
||||
|
||||
Driver by Uki
|
||||
|
||||
@ -59,10 +59,10 @@ private:
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
uint8_t m_status;
|
||||
uint8_t m_xscroll;
|
||||
uint8_t m_yscroll;
|
||||
uint8_t m_flipscreen;
|
||||
uint8_t m_status = 0;
|
||||
uint8_t m_xscroll = 0;
|
||||
uint8_t m_yscroll = 0;
|
||||
uint8_t m_flipscreen = 0;
|
||||
|
||||
void bank_sel_w(uint8_t data);
|
||||
void status_m_w(uint8_t data);
|
||||
|
@ -169,8 +169,8 @@ bool stack_walker::s_initialized = false;
|
||||
// stack_walker - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
stack_walker::stack_walker()
|
||||
: m_process(GetCurrentProcess()),
|
||||
stack_walker::stack_walker() :
|
||||
m_process(GetCurrentProcess()),
|
||||
m_thread(GetCurrentThread()),
|
||||
m_first(true)
|
||||
{
|
||||
@ -289,8 +289,8 @@ bool stack_walker::unwind()
|
||||
// symbol_manager - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
symbol_manager::symbol_manager(const char *argv0)
|
||||
: m_mapfile(argv0),
|
||||
symbol_manager::symbol_manager(const char *argv0) :
|
||||
m_mapfile(argv0),
|
||||
m_symfile(argv0),
|
||||
m_process(GetCurrentProcess()),
|
||||
m_last_base(0),
|
||||
@ -300,7 +300,7 @@ symbol_manager::symbol_manager(const char *argv0)
|
||||
// compute the name of the mapfile
|
||||
int extoffs = m_mapfile.find_last_of('.');
|
||||
if (extoffs != -1)
|
||||
m_mapfile.substr(0, extoffs);
|
||||
m_mapfile = m_mapfile.substr(0, extoffs);
|
||||
m_mapfile.append(".map");
|
||||
|
||||
// and the name of the symfile
|
||||
@ -653,8 +653,8 @@ uintptr_t symbol_manager::get_text_section_base(ULONG &size)
|
||||
// sampling_profiler - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
sampling_profiler::sampling_profiler(uint32_t max_seconds, uint8_t stack_depth = 0)
|
||||
: m_target_thread(nullptr),
|
||||
sampling_profiler::sampling_profiler(uint32_t max_seconds, uint8_t stack_depth = 0) :
|
||||
m_target_thread(nullptr),
|
||||
m_thread(nullptr),
|
||||
m_thread_id(0),
|
||||
m_thread_exit(false),
|
||||
|
Loading…
Reference in New Issue
Block a user