Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
1dab1382aa
@ -12,6 +12,20 @@ Titles, publishers and release dates taken from:
|
|||||||
|
|
||||||
<softwarelist name="x1_cass" description="Sharp X1 cassettes">
|
<softwarelist name="x1_cass" description="Sharp X1 cassettes">
|
||||||
|
|
||||||
|
<software name="alamein">
|
||||||
|
<description>El Alamein</description>
|
||||||
|
<year>1983</year>
|
||||||
|
<publisher>ポニカ (Pony Canyon)</publisher>
|
||||||
|
<info name="alt_title" value="エル・アラメイン"/>
|
||||||
|
<info name="usage" value="In BASIC, type LOAD and then RUN"/>
|
||||||
|
<sharedfeat name="requirement" value="x1_flop:tapbas"/>
|
||||||
|
<part name="cass" interface="x1_cass">
|
||||||
|
<dataarea name="side1" size="12742140">
|
||||||
|
<rom name="alamein.wav" size="12742140" crc="04e00f60" sha1="42f3ef356fdb67ddd0fbdb57e473c23d267f9bf4" offset="0" />
|
||||||
|
</dataarea>
|
||||||
|
</part>
|
||||||
|
</software>
|
||||||
|
|
||||||
<software name="blckonyx" supported="no">
|
<software name="blckonyx" supported="no">
|
||||||
<description>The Black Onyx</description>
|
<description>The Black Onyx</description>
|
||||||
<year>1985</year>
|
<year>1985</year>
|
||||||
@ -76,6 +90,18 @@ Titles, publishers and release dates taken from:
|
|||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
|
<software name="cball">
|
||||||
|
<description>Cannon Ball</description>
|
||||||
|
<year>1983</year>
|
||||||
|
<publisher>ハドソン (Hudson Soft)</publisher>
|
||||||
|
<info name="alt_title" value="キャノンボール"/>
|
||||||
|
<part name="cass" interface="x1_cass">
|
||||||
|
<dataarea name="side1" size="4857558">
|
||||||
|
<rom name="cball.wav" size="4857558" crc="4405cf21" sha1="769a43d97f69b5d72347ca8b72547e464b9d059b" offset="0" />
|
||||||
|
</dataarea>
|
||||||
|
</part>
|
||||||
|
</software>
|
||||||
|
|
||||||
<software name="cprowsp">
|
<software name="cprowsp">
|
||||||
<description>Champion ProWres Special</description>
|
<description>Champion ProWres Special</description>
|
||||||
@ -296,6 +322,18 @@ Titles, publishers and release dates taken from:
|
|||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
|
<software name="machgjoe">
|
||||||
|
<description>Ginkou Goutou - Machinegun Joe vs. the Mafia</description>
|
||||||
|
<year>1983</year>
|
||||||
|
<publisher>ハドソン (Hudson Soft)</publisher>
|
||||||
|
<info name="alt_title" value="銀行強盗 マシンガンジョー VS ザ・マフィア"/>
|
||||||
|
<part name="cass" interface="x1_cass">
|
||||||
|
<dataarea name="side1" size="15591932">
|
||||||
|
<rom name="machgjoe.wav" size="15591932" crc="3769199a" sha1="81614c317f432055f2c5fdcce51438de9fbdad7f" offset="0" />
|
||||||
|
</dataarea>
|
||||||
|
</part>
|
||||||
|
</software>
|
||||||
|
|
||||||
<software name="mappy">
|
<software name="mappy">
|
||||||
<description>Mappy</description>
|
<description>Mappy</description>
|
||||||
|
@ -13,6 +13,14 @@
|
|||||||
Supports 8-bit linear and 8-bit muLaw samples
|
Supports 8-bit linear and 8-bit muLaw samples
|
||||||
Output: digital, 16 bit, 4 channels
|
Output: digital, 16 bit, 4 channels
|
||||||
Output sample rate is the input clock / (288 * 2).
|
Output sample rate is the input clock / (288 * 2).
|
||||||
|
|
||||||
|
superctr: The clock divider appears to be configurable for each system.
|
||||||
|
Below is a list of the divider values followed by the systems that use it.
|
||||||
|
|
||||||
|
* 228: System 11.
|
||||||
|
* 288: System 22, Super 22, NB-1/2, ND-1, FL.
|
||||||
|
* 296: System 23, Super 23.
|
||||||
|
* 332: System 12.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -468,7 +476,7 @@ void c352_device::write_reg16(unsigned long address, unsigned short val)
|
|||||||
|
|
||||||
void c352_device::device_start()
|
void c352_device::device_start()
|
||||||
{
|
{
|
||||||
int i, divider;
|
int i;
|
||||||
double x_max = 32752.0;
|
double x_max = 32752.0;
|
||||||
double y_max = 127.0;
|
double y_max = 127.0;
|
||||||
double u = 10.0;
|
double u = 10.0;
|
||||||
@ -476,21 +484,7 @@ void c352_device::device_start()
|
|||||||
// find our direct access
|
// find our direct access
|
||||||
m_direct = &space().direct();
|
m_direct = &space().direct();
|
||||||
|
|
||||||
switch(m_divider)
|
m_sample_rate_base = clock() / m_divider;
|
||||||
{
|
|
||||||
case C352_DIVIDER_228:
|
|
||||||
divider=228;
|
|
||||||
break;
|
|
||||||
case C352_DIVIDER_288:
|
|
||||||
default:
|
|
||||||
divider=288;
|
|
||||||
break;
|
|
||||||
case C352_DIVIDER_332:
|
|
||||||
divider=332;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_sample_rate_base = clock() / divider;
|
|
||||||
|
|
||||||
m_stream = machine().sound().stream_alloc(*this, 0, 4, m_sample_rate_base);
|
m_stream = machine().sound().stream_alloc(*this, 0, 4, m_sample_rate_base);
|
||||||
|
|
||||||
|
@ -5,17 +5,6 @@
|
|||||||
#ifndef __C352_H__
|
#ifndef __C352_H__
|
||||||
#define __C352_H__
|
#define __C352_H__
|
||||||
|
|
||||||
//**************************************************************************
|
|
||||||
// CONSTANTS
|
|
||||||
//**************************************************************************
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
C352_DIVIDER_228 = 0,
|
|
||||||
C352_DIVIDER_288 = 1,
|
|
||||||
C352_DIVIDER_332 = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// INTERFACE CONFIGURATION MACROS
|
// INTERFACE CONFIGURATION MACROS
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
|
@ -610,7 +610,7 @@ static MACHINE_CONFIG_START( namcofl, namcofl_state )
|
|||||||
MCFG_VIDEO_START_OVERRIDE(namcofl_state,namcofl)
|
MCFG_VIDEO_START_OVERRIDE(namcofl_state,namcofl)
|
||||||
|
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
MCFG_C352_ADD("c352", 48384000/2, C352_DIVIDER_288)
|
MCFG_C352_ADD("c352", 48384000/2, 288)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -1126,7 +1126,7 @@ static MACHINE_CONFIG_START( namconb1, namconb1_state )
|
|||||||
MCFG_VIDEO_START_OVERRIDE(namconb1_state,namconb1)
|
MCFG_VIDEO_START_OVERRIDE(namconb1_state,namconb1)
|
||||||
|
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
MCFG_C352_ADD("c352", MASTER_CLOCK/2, C352_DIVIDER_288)
|
MCFG_C352_ADD("c352", MASTER_CLOCK/2, 288)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
@ -1163,7 +1163,7 @@ static MACHINE_CONFIG_START( namconb2, namconb1_state )
|
|||||||
MCFG_VIDEO_START_OVERRIDE(namconb1_state,namconb2)
|
MCFG_VIDEO_START_OVERRIDE(namconb1_state,namconb2)
|
||||||
|
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
MCFG_C352_ADD("c352", MASTER_CLOCK/2, C352_DIVIDER_288)
|
MCFG_C352_ADD("c352", MASTER_CLOCK/2, 288)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -307,7 +307,7 @@ static MACHINE_CONFIG_START( namcond1, namcond1_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", XTAL_49_152MHz/2, C352_DIVIDER_288)
|
MCFG_C352_ADD("c352", XTAL_49_152MHz/2, 288)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -571,7 +571,7 @@ static MACHINE_CONFIG_START( coh110, namcos11_state )
|
|||||||
|
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", 20013200, C352_DIVIDER_228)
|
MCFG_C352_ADD("c352", 20013200, 228)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -1622,7 +1622,7 @@ static MACHINE_CONFIG_START( coh700, namcos12_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", 29168000, C352_DIVIDER_332)
|
MCFG_C352_ADD("c352", 29168000, 332)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -3781,7 +3781,7 @@ static MACHINE_CONFIG_START( namcos22, namcos22_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", SS22_MASTER_CLOCK/2, C352_DIVIDER_288)
|
MCFG_C352_ADD("c352", SS22_MASTER_CLOCK/2, 288)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
@ -3830,7 +3830,7 @@ static MACHINE_CONFIG_START( namcos22s, namcos22_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", SS22_MASTER_CLOCK/2, C352_DIVIDER_288)
|
MCFG_C352_ADD("c352", SS22_MASTER_CLOCK/2, 288)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -1247,7 +1247,8 @@ Notes:
|
|||||||
#define JVSCLOCK (XTAL_14_7456MHz)
|
#define JVSCLOCK (XTAL_14_7456MHz)
|
||||||
#define H8CLOCK (16737350) /* from 2061 */
|
#define H8CLOCK (16737350) /* from 2061 */
|
||||||
#define BUSCLOCK (16737350*2) /* 33MHz CPU bus clock / input */
|
#define BUSCLOCK (16737350*2) /* 33MHz CPU bus clock / input */
|
||||||
#define C352CLOCK (25992000) /* measured at 25.992MHz from 2061 pin 9 (System 12 uses a divider of 332) */
|
#define C352CLOCK (25992000) /* measured at 25.992MHz from 2061 pin 9 */
|
||||||
|
#define C352DIV (296)
|
||||||
#define VSYNC1 (59.8824)
|
#define VSYNC1 (59.8824)
|
||||||
#define VSYNC2 (59.915)
|
#define VSYNC2 (59.915)
|
||||||
#define HSYNC (16666150)
|
#define HSYNC (16666150)
|
||||||
@ -3320,7 +3321,7 @@ static MACHINE_CONFIG_START( gorgon, namcos23_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", C352CLOCK, C352_DIVIDER_332)
|
MCFG_C352_ADD("c352", C352CLOCK, C352DIV)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
@ -3389,7 +3390,7 @@ static MACHINE_CONFIG_START( s23, namcos23_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", C352CLOCK, C352_DIVIDER_332)
|
MCFG_C352_ADD("c352", C352CLOCK, C352DIV)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
@ -3469,7 +3470,7 @@ static MACHINE_CONFIG_START( ss23, namcos23_state )
|
|||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||||
|
|
||||||
MCFG_C352_ADD("c352", C352CLOCK, C352_DIVIDER_332)
|
MCFG_C352_ADD("c352", C352CLOCK, C352DIV)
|
||||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||||
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
MCFG_SOUND_ROUTE(2, "rspeaker", 1.00)
|
||||||
|
@ -378,7 +378,7 @@ void mc1000_state::machine_reset()
|
|||||||
+---------*---*---o V+
|
+---------*---*---o V+
|
||||||
| | |
|
| | |
|
||||||
+-+ | |
|
+-+ | |
|
||||||
| |309K | |
|
| |390K | |
|
||||||
| |R17 |8 |4
|
| |R17 |8 |4
|
||||||
+-+ +-------+
|
+-+ +-------+
|
||||||
| 7| |3
|
| 7| |3
|
||||||
@ -390,23 +390,23 @@ void mc1000_state::machine_reset()
|
|||||||
| | | | 555 |
|
| | | | 555 |
|
||||||
+-+ | | |
|
+-+ | | |
|
||||||
| | 6| |5
|
| | 6| |5
|
||||||
*----*?-| |---+
|
*----*--| |---+
|
||||||
| | | |
|
| | | |
|
||||||
---C30 +-------+ ---C29
|
---C30 +-------+ ---C29
|
||||||
---103 |1 ---103
|
---10n |1 ---10n
|
||||||
_|_ _|_ _|_
|
_|_ _|_ _|_
|
||||||
/// /// ///
|
/// /// ///
|
||||||
|
|
||||||
Calculated properties:
|
Calculated properties:
|
||||||
|
|
||||||
* 99.74489795918367 Duty Cycle Percentage
|
* 99.74489795918367 Duty Cycle Percentage
|
||||||
* 368.1126130105722 Frequency in Hertz
|
* 367.3469387755102 Frequency in Hertz
|
||||||
* 0.00000693 Seconds Low
|
* 0.00000693 Seconds Low
|
||||||
* 0.0027096299999999998 Seconds High
|
* 0.00270963 Seconds High
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MC1000_NE555_FREQ (368) /* Hz */
|
#define MC1000_NE555_FREQ (367) /* Hz */
|
||||||
#define MC1000_NE555_DUTY_CYCLE (99.745) /* % */
|
#define MC1000_NE555_DUTY_CYCLE (99.745) /* % */
|
||||||
|
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(mc1000_state::ne555_tick)
|
TIMER_DEVICE_CALLBACK_MEMBER(mc1000_state::ne555_tick)
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
#include "strconv.h"
|
#include "strconv.h"
|
||||||
|
|
||||||
|
#include "winutil.h"
|
||||||
|
|
||||||
|
|
||||||
// debugger view styles
|
// debugger view styles
|
||||||
#define DEBUG_VIEW_STYLE WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
|
#define DEBUG_VIEW_STYLE WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
|
||||||
@ -48,15 +50,15 @@ debugview_info::debugview_info(debugger_windows_interface &debugger, debugwin_in
|
|||||||
|
|
||||||
// create the child view
|
// create the child view
|
||||||
m_wnd = CreateWindowEx(DEBUG_VIEW_STYLE_EX, TEXT("MAMEDebugView"), NULL, DEBUG_VIEW_STYLE,
|
m_wnd = CreateWindowEx(DEBUG_VIEW_STYLE_EX, TEXT("MAMEDebugView"), NULL, DEBUG_VIEW_STYLE,
|
||||||
0, 0, 100, 100, parent, NULL, GetModuleHandle(NULL), this);
|
0, 0, 100, 100, parent, NULL, GetModuleHandleUni(), this);
|
||||||
if (m_wnd == NULL)
|
if (m_wnd == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
// create the scroll bars
|
// create the scroll bars
|
||||||
m_hscroll = CreateWindowEx(HSCROLL_STYLE_EX, TEXT("SCROLLBAR"), NULL, HSCROLL_STYLE,
|
m_hscroll = CreateWindowEx(HSCROLL_STYLE_EX, TEXT("SCROLLBAR"), NULL, HSCROLL_STYLE,
|
||||||
0, 0, 100, CW_USEDEFAULT, m_wnd, NULL, GetModuleHandle(NULL), this);
|
0, 0, 100, CW_USEDEFAULT, m_wnd, NULL, GetModuleHandleUni(), this);
|
||||||
m_vscroll = CreateWindowEx(VSCROLL_STYLE_EX, TEXT("SCROLLBAR"), NULL, VSCROLL_STYLE,
|
m_vscroll = CreateWindowEx(VSCROLL_STYLE_EX, TEXT("SCROLLBAR"), NULL, VSCROLL_STYLE,
|
||||||
0, 0, CW_USEDEFAULT, 100, m_wnd, NULL, GetModuleHandle(NULL), this);
|
0, 0, CW_USEDEFAULT, 100, m_wnd, NULL, GetModuleHandleUni(), this);
|
||||||
if ((m_hscroll == NULL) || (m_vscroll == NULL))
|
if ((m_hscroll == NULL) || (m_vscroll == NULL))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -254,7 +256,7 @@ HWND debugview_info::create_source_combobox(HWND parent, LONG_PTR userdata)
|
|||||||
{
|
{
|
||||||
// create a combo box
|
// create a combo box
|
||||||
HWND const result = CreateWindowEx(COMBO_BOX_STYLE_EX, TEXT("COMBOBOX"), NULL, COMBO_BOX_STYLE,
|
HWND const result = CreateWindowEx(COMBO_BOX_STYLE_EX, TEXT("COMBOBOX"), NULL, COMBO_BOX_STYLE,
|
||||||
0, 0, 100, 1000, parent, NULL, GetModuleHandle(NULL), NULL);
|
0, 0, 100, 1000, parent, NULL, GetModuleHandleUni(), NULL);
|
||||||
SetWindowLongPtr(result, GWLP_USERDATA, userdata);
|
SetWindowLongPtr(result, GWLP_USERDATA, userdata);
|
||||||
SendMessage(result, WM_SETFONT, (WPARAM)metrics().debug_font(), (LPARAM)FALSE);
|
SendMessage(result, WM_SETFONT, (WPARAM)metrics().debug_font(), (LPARAM)FALSE);
|
||||||
|
|
||||||
@ -789,7 +791,7 @@ void debugview_info::register_window_class()
|
|||||||
|
|
||||||
// initialize the description of the window class
|
// initialize the description of the window class
|
||||||
wc.lpszClassName = TEXT("MAMEDebugView");
|
wc.lpszClassName = TEXT("MAMEDebugView");
|
||||||
wc.hInstance = GetModuleHandle(NULL);
|
wc.hInstance = GetModuleHandleUni();
|
||||||
wc.lpfnWndProc = &debugview_info::static_view_proc;
|
wc.lpfnWndProc = &debugview_info::static_view_proc;
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
||||||
@ -798,6 +800,8 @@ void debugview_info::register_window_class()
|
|||||||
wc.style = 0;
|
wc.style = 0;
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0;
|
||||||
|
|
||||||
|
UnregisterClass(wc.lpszClassName, wc.hInstance);
|
||||||
|
|
||||||
// register the class; fail if we can't
|
// register the class; fail if we can't
|
||||||
if (!RegisterClass(&wc))
|
if (!RegisterClass(&wc))
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "winutf8.h"
|
#include "winutf8.h"
|
||||||
|
|
||||||
|
#include "winutil.h"
|
||||||
|
|
||||||
|
|
||||||
bool debugwin_info::s_window_class_registered = false;
|
bool debugwin_info::s_window_class_registered = false;
|
||||||
|
|
||||||
@ -36,7 +38,7 @@ debugwin_info::debugwin_info(debugger_windows_interface &debugger, bool is_main_
|
|||||||
register_window_class();
|
register_window_class();
|
||||||
|
|
||||||
m_wnd = win_create_window_ex_utf8(DEBUG_WINDOW_STYLE_EX, "MAMEDebugWindow", title, DEBUG_WINDOW_STYLE,
|
m_wnd = win_create_window_ex_utf8(DEBUG_WINDOW_STYLE_EX, "MAMEDebugWindow", title, DEBUG_WINDOW_STYLE,
|
||||||
0, 0, 100, 100, win_window_list->m_hwnd, create_standard_menubar(), GetModuleHandle(NULL), this);
|
0, 0, 100, 100, win_window_list->m_hwnd, create_standard_menubar(), GetModuleHandleUni(), this);
|
||||||
if (m_wnd == NULL)
|
if (m_wnd == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -580,7 +582,7 @@ void debugwin_info::register_window_class()
|
|||||||
|
|
||||||
// initialize the description of the window class
|
// initialize the description of the window class
|
||||||
wc.lpszClassName = TEXT("MAMEDebugWindow");
|
wc.lpszClassName = TEXT("MAMEDebugWindow");
|
||||||
wc.hInstance = GetModuleHandle(NULL);
|
wc.hInstance = GetModuleHandleUni();
|
||||||
wc.lpfnWndProc = &debugwin_info::static_window_proc;
|
wc.lpfnWndProc = &debugwin_info::static_window_proc;
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
||||||
@ -589,6 +591,8 @@ void debugwin_info::register_window_class()
|
|||||||
wc.style = 0;
|
wc.style = 0;
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0;
|
||||||
|
|
||||||
|
UnregisterClass(wc.lpszClassName, wc.hInstance);
|
||||||
|
|
||||||
// register the class; fail if we can't
|
// register the class; fail if we can't
|
||||||
if (!RegisterClass(&wc))
|
if (!RegisterClass(&wc))
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#include "strconv.h"
|
#include "strconv.h"
|
||||||
|
|
||||||
|
#include "winutil.h"
|
||||||
|
|
||||||
|
|
||||||
// edit box styles
|
// edit box styles
|
||||||
#define EDIT_BOX_STYLE WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL
|
#define EDIT_BOX_STYLE WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL
|
||||||
@ -32,7 +34,7 @@ editwin_info::editwin_info(debugger_windows_interface &debugger, bool is_main_co
|
|||||||
|
|
||||||
// create an edit box and override its key handling
|
// create an edit box and override its key handling
|
||||||
m_editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), NULL, EDIT_BOX_STYLE,
|
m_editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), NULL, EDIT_BOX_STYLE,
|
||||||
0, 0, 100, 100, window(), NULL, GetModuleHandle(NULL), NULL);
|
0, 0, 100, 100, window(), NULL, GetModuleHandleUni(), NULL);
|
||||||
m_original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(m_editwnd, GWLP_WNDPROC);
|
m_original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(m_editwnd, GWLP_WNDPROC);
|
||||||
SetWindowLongPtr(m_editwnd, GWLP_USERDATA, (LONG_PTR)this);
|
SetWindowLongPtr(m_editwnd, GWLP_USERDATA, (LONG_PTR)this);
|
||||||
SetWindowLongPtr(m_editwnd, GWLP_WNDPROC, (LONG_PTR)&editwin_info::static_edit_proc);
|
SetWindowLongPtr(m_editwnd, GWLP_WNDPROC, (LONG_PTR)&editwin_info::static_edit_proc);
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
#include "strconv.h"
|
#include "strconv.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "winutil.h"
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
// PARAMETERS
|
// PARAMETERS
|
||||||
//============================================================
|
//============================================================
|
||||||
@ -1117,7 +1119,7 @@ static void dinput_init(running_machine &machine)
|
|||||||
int didevtype_joystick = DI8DEVCLASS_GAMECTRL;
|
int didevtype_joystick = DI8DEVCLASS_GAMECTRL;
|
||||||
|
|
||||||
dinput_version = DIRECTINPUT_VERSION;
|
dinput_version = DIRECTINPUT_VERSION;
|
||||||
result = DirectInput8Create(GetModuleHandle(NULL), dinput_version, IID_IDirectInput8, (void **)&dinput, NULL);
|
result = DirectInput8Create(GetModuleHandleUni(), dinput_version, IID_IDirectInput8, (void **)&dinput, NULL);
|
||||||
if (result != DI_OK)
|
if (result != DI_OK)
|
||||||
{
|
{
|
||||||
dinput_version = 0;
|
dinput_version = 0;
|
||||||
@ -1130,17 +1132,17 @@ static void dinput_init(running_machine &machine)
|
|||||||
|
|
||||||
// first attempt to initialize DirectInput at the current version
|
// first attempt to initialize DirectInput at the current version
|
||||||
dinput_version = DIRECTINPUT_VERSION;
|
dinput_version = DIRECTINPUT_VERSION;
|
||||||
result = DirectInputCreate(GetModuleHandle(NULL), dinput_version, &dinput, NULL);
|
result = DirectInputCreate(GetModuleHandleUni(), dinput_version, &dinput, NULL);
|
||||||
if (result != DI_OK)
|
if (result != DI_OK)
|
||||||
{
|
{
|
||||||
// if that fails, try version 5
|
// if that fails, try version 5
|
||||||
dinput_version = 0x0500;
|
dinput_version = 0x0500;
|
||||||
result = DirectInputCreate(GetModuleHandle(NULL), dinput_version, &dinput, NULL);
|
result = DirectInputCreate(GetModuleHandleUni(), dinput_version, &dinput, NULL);
|
||||||
if (result != DI_OK)
|
if (result != DI_OK)
|
||||||
{
|
{
|
||||||
// if that fails, try version 3
|
// if that fails, try version 3
|
||||||
dinput_version = 0x0300;
|
dinput_version = 0x0300;
|
||||||
result = DirectInputCreate(GetModuleHandle(NULL), dinput_version, &dinput, NULL);
|
result = DirectInputCreate(GetModuleHandleUni(), dinput_version, &dinput, NULL);
|
||||||
if (result != DI_OK)
|
if (result != DI_OK)
|
||||||
{
|
{
|
||||||
dinput_version = 0;
|
dinput_version = 0;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
// MAMEOS headers
|
// MAMEOS headers
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
|
|
||||||
|
#include "winutil.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
@ -101,7 +103,7 @@ bool windows_osd_interface::output_init()
|
|||||||
1, 1,
|
1, 1,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
GetModuleHandle(NULL),
|
GetModuleHandleUni(),
|
||||||
NULL);
|
NULL);
|
||||||
assert(output_hwnd != NULL);
|
assert(output_hwnd != NULL);
|
||||||
|
|
||||||
@ -167,8 +169,10 @@ static int create_window_class(void)
|
|||||||
|
|
||||||
// initialize the description of the window class
|
// initialize the description of the window class
|
||||||
wc.lpszClassName = OUTPUT_WINDOW_CLASS;
|
wc.lpszClassName = OUTPUT_WINDOW_CLASS;
|
||||||
wc.hInstance = GetModuleHandle(NULL);
|
wc.hInstance = GetModuleHandleUni();
|
||||||
wc.lpfnWndProc = output_window_proc;
|
wc.lpfnWndProc = output_window_proc;
|
||||||
|
|
||||||
|
UnregisterClass(wc.lpszClassName, wc.hInstance);
|
||||||
|
|
||||||
// register the class; fail if we can't
|
// register the class; fail if we can't
|
||||||
if (!RegisterClass(&wc))
|
if (!RegisterClass(&wc))
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "winutf8.h"
|
#include "winutf8.h"
|
||||||
|
|
||||||
|
#include "winutil.h"
|
||||||
|
|
||||||
extern int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks);
|
extern int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks);
|
||||||
extern int drawgdi_init(running_machine &machine, osd_draw_callbacks *callbacks);
|
extern int drawgdi_init(running_machine &machine, osd_draw_callbacks *callbacks);
|
||||||
extern int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks);
|
extern int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks);
|
||||||
@ -885,10 +887,12 @@ static void create_window_class(void)
|
|||||||
|
|
||||||
// initialize the description of the window class
|
// initialize the description of the window class
|
||||||
wc.lpszClassName = TEXT("MAME");
|
wc.lpszClassName = TEXT("MAME");
|
||||||
wc.hInstance = GetModuleHandle(NULL);
|
wc.hInstance = GetModuleHandleUni();
|
||||||
wc.lpfnWndProc = winwindow_video_window_proc_ui;
|
wc.lpfnWndProc = winwindow_video_window_proc_ui;
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
||||||
|
|
||||||
|
UnregisterClass(wc.lpszClassName, wc.hInstance);
|
||||||
|
|
||||||
// register the class; fail if we can't
|
// register the class; fail if we can't
|
||||||
if (!RegisterClass(&wc))
|
if (!RegisterClass(&wc))
|
||||||
@ -1191,7 +1195,7 @@ int win_window_info::complete_create()
|
|||||||
monitorbounds.left() + 100, monitorbounds.top() + 100,
|
monitorbounds.left() + 100, monitorbounds.top() + 100,
|
||||||
NULL,//(win_window_list != NULL) ? win_window_list->m_hwnd : NULL,
|
NULL,//(win_window_list != NULL) ? win_window_list->m_hwnd : NULL,
|
||||||
menu,
|
menu,
|
||||||
GetModuleHandle(NULL),
|
GetModuleHandleUni(),
|
||||||
NULL);
|
NULL);
|
||||||
if (m_hwnd == NULL)
|
if (m_hwnd == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1321,7 +1321,7 @@ FPTR symbol_manager::get_text_section_base()
|
|||||||
dynamic_bind<PIMAGE_NT_HEADERS (WINAPI *)(PVOID)> image_nt_header(TEXT("dbghelp.dll"), "ImageNtHeader");
|
dynamic_bind<PIMAGE_NT_HEADERS (WINAPI *)(PVOID)> image_nt_header(TEXT("dbghelp.dll"), "ImageNtHeader");
|
||||||
|
|
||||||
// start with the image base
|
// start with the image base
|
||||||
PVOID base = reinterpret_cast<PVOID>(GetModuleHandle(NULL));
|
PVOID base = reinterpret_cast<PVOID>(GetModuleHandleUni());
|
||||||
assert(base != NULL);
|
assert(base != NULL);
|
||||||
|
|
||||||
// make sure we have the functions we need
|
// make sure we have the functions we need
|
||||||
|
@ -92,7 +92,7 @@ BOOL win_is_gui_application(void)
|
|||||||
is_first_time = FALSE;
|
is_first_time = FALSE;
|
||||||
|
|
||||||
// get the current module
|
// get the current module
|
||||||
module = GetModuleHandle(NULL);
|
module = GetModuleHandleUni();
|
||||||
if (!module)
|
if (!module)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
image_ptr = (BYTE*) module;
|
image_ptr = (BYTE*) module;
|
||||||
@ -122,3 +122,14 @@ BOOL win_is_gui_application(void)
|
|||||||
}
|
}
|
||||||
return is_gui_frontend;
|
return is_gui_frontend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Universal way to get module handle
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
HMODULE WINAPI GetModuleHandleUni()
|
||||||
|
{
|
||||||
|
MEMORY_BASIC_INFORMATION mbi;
|
||||||
|
VirtualQuery((LPCVOID)GetModuleHandleUni, &mbi, sizeof(mbi));
|
||||||
|
return (HMODULE)mbi.AllocationBase;
|
||||||
|
}
|
||||||
|
@ -15,5 +15,6 @@
|
|||||||
file_error win_error_to_file_error(DWORD error);
|
file_error win_error_to_file_error(DWORD error);
|
||||||
osd_dir_entry_type win_attributes_to_entry_type(DWORD attributes);
|
osd_dir_entry_type win_attributes_to_entry_type(DWORD attributes);
|
||||||
BOOL win_is_gui_application(void);
|
BOOL win_is_gui_application(void);
|
||||||
|
HMODULE WINAPI GetModuleHandleUni();
|
||||||
|
|
||||||
#endif // __WINUTIL__
|
#endif // __WINUTIL__
|
||||||
|
Loading…
Reference in New Issue
Block a user