summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-07-31 16:47:26 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-07-31 16:47:26 +0200
commitf127621e13050aad6b455ebfadec5bfdcbdd00d4 (patch)
tree0601ca3093ab58610f108f93167d344151b2d4e5 /src/mame
parenteaa70ae0313eb1135ba63814f07f7e22c766a504 (diff)
made constexprs lower case and used constexpr for returning input value as well for rest of defines in osdcomm.h (nw)
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/audio/snes_snd.cpp4
-rw-r--r--src/mame/drivers/apexc.cpp4
-rw-r--r--src/mame/drivers/cps3.cpp18
-rw-r--r--src/mame/drivers/homelab.cpp4
-rw-r--r--src/mame/drivers/mekd2.cpp4
-rw-r--r--src/mame/drivers/tmnt.cpp4
-rw-r--r--src/mame/machine/cbm_snqk.cpp2
-rw-r--r--src/mame/machine/decocrpt.cpp4
-rw-r--r--src/mame/machine/fddebug.cpp6
-rw-r--r--src/mame/machine/z80bin.cpp6
10 files changed, 28 insertions, 28 deletions
diff --git a/src/mame/audio/snes_snd.cpp b/src/mame/audio/snes_snd.cpp
index a9295fd560c..127fec049ce 100644
--- a/src/mame/audio/snes_snd.cpp
+++ b/src/mame/audio/snes_snd.cpp
@@ -149,8 +149,8 @@ static const int ENVCNT[0x20]
#define SR( v ) (m_dsp_regs[((v) << 4) + 6] & 0x1f) /* Returns SUSTAIN rate */
/* Handle endianness */
-#define LEtoME16( x ) LITTLE_ENDIANIZE_INT16(x)
-#define MEtoLE16( x ) LITTLE_ENDIANIZE_INT16(x)
+#define LEtoME16( x ) little_endianize_int16(x)
+#define MEtoLE16( x ) little_endianize_int16(x)
const device_type SNES = &device_creator<snes_sound_device>;
diff --git a/src/mame/drivers/apexc.cpp b/src/mame/drivers/apexc.cpp
index acbdb0b39c0..2dac4620982 100644
--- a/src/mame/drivers/apexc.cpp
+++ b/src/mame/drivers/apexc.cpp
@@ -118,7 +118,7 @@ bool apexc_cylinder_image_device::call_load()
UINT32 *RAM = (UINT32 *)(machine().root_device().memregion("maincpu")->base());
for (int i=0; i < 0x0400; i++)
- RAM[i] = BIG_ENDIANIZE_INT32(RAM[i]);
+ RAM[i] = big_endianize_int32(RAM[i]);
}
#endif
@@ -139,7 +139,7 @@ void apexc_cylinder_image_device::call_unload()
UINT32 *RAM = (UINT32 *)(machine().root_device().memregion("maincpu")->base());
for (int i=0; i < /*0x2000*/0x0400; i++)
- RAM[i] = BIG_ENDIANIZE_INT32(RAM[i]);
+ RAM[i] = big_endianize_int32(RAM[i]);
}
#endif
/* write */
diff --git a/src/mame/drivers/cps3.cpp b/src/mame/drivers/cps3.cpp
index f82276b13c9..4d703937971 100644
--- a/src/mame/drivers/cps3.cpp
+++ b/src/mame/drivers/cps3.cpp
@@ -1331,7 +1331,7 @@ UINT32 cps3_state::screen_update_cps3(screen_device &screen, bitmap_rgb32 &bitma
READ32_MEMBER(cps3_state::cps3_ssram_r)
{
if (offset>0x8000/4)
- return LITTLE_ENDIANIZE_INT32(m_ss_ram[offset]);
+ return little_endianize_int32(m_ss_ram[offset]);
else
return m_ss_ram[offset];
}
@@ -1341,8 +1341,8 @@ WRITE32_MEMBER(cps3_state::cps3_ssram_w)
if (offset>0x8000/4)
{
// we only want to endian-flip the character data, the tilemap info is fine
- data = LITTLE_ENDIANIZE_INT32(data);
- mem_mask = LITTLE_ENDIANIZE_INT32(mem_mask);
+ data = little_endianize_int32(data);
+ mem_mask = little_endianize_int32(mem_mask);
m_gfxdecode->gfx(0)->mark_dirty(offset/16);
}
@@ -1389,14 +1389,14 @@ READ32_MEMBER(cps3_state::cram_data_r)
{
UINT32 fulloffset = (((m_cram_bank&0x7)*0x100000)/4) + offset;
- return LITTLE_ENDIANIZE_INT32(m_char_ram[fulloffset]);
+ return little_endianize_int32(m_char_ram[fulloffset]);
}
WRITE32_MEMBER(cps3_state::cram_data_w)
{
UINT32 fulloffset = (((m_cram_bank&0x7)*0x100000)/4) + offset;
- mem_mask = LITTLE_ENDIANIZE_INT32(mem_mask);
- data = LITTLE_ENDIANIZE_INT32(data);
+ mem_mask = little_endianize_int32(mem_mask);
+ data = little_endianize_int32(data);
COMBINE_DATA(&m_char_ram[fulloffset]);
m_gfxdecode->gfx(1)->mark_dirty(fulloffset/0x40);
}
@@ -2016,9 +2016,9 @@ void cps3_state::cps3_process_character_dma(UINT32 address)
for (i = 0; i < 0x1000; i += 3)
{
- UINT32 dat1 = LITTLE_ENDIANIZE_INT32(m_char_ram[i + 0 + (address)]);
- UINT32 dat2 = LITTLE_ENDIANIZE_INT32(m_char_ram[i + 1 + (address)]);
- UINT32 dat3 = LITTLE_ENDIANIZE_INT32(m_char_ram[i + 2 + (address)]);
+ UINT32 dat1 = little_endianize_int32(m_char_ram[i + 0 + (address)]);
+ UINT32 dat2 = little_endianize_int32(m_char_ram[i + 1 + (address)]);
+ UINT32 dat3 = little_endianize_int32(m_char_ram[i + 2 + (address)]);
UINT32 real_source = (dat3 << 1) - 0x400000;
UINT32 real_destination = dat2 << 3;
UINT32 real_length = (((dat1 & 0x001fffff) + 1) << 3);
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index 7c1ab0eb2cc..66bb22675db 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -698,8 +698,8 @@ QUICKLOAD_LOAD_MEMBER( homelab_state,homelab)
return IMAGE_INIT_FAIL;
}
- quick_addr = LITTLE_ENDIANIZE_INT16(args[0]);
- quick_length = LITTLE_ENDIANIZE_INT16(args[1]);
+ quick_addr = little_endianize_int16(args[0]);
+ quick_length = little_endianize_int16(args[1]);
quick_end = quick_addr+quick_length-1;
if (quick_end > 0x7fff)
diff --git a/src/mame/drivers/mekd2.cpp b/src/mame/drivers/mekd2.cpp
index a2b7d1f9d71..3e35ea23fff 100644
--- a/src/mame/drivers/mekd2.cpp
+++ b/src/mame/drivers/mekd2.cpp
@@ -315,9 +315,9 @@ QUICKLOAD_LOAD_MEMBER( mekd2_state, mekd2_quik )
return IMAGE_INIT_FAIL;
}
image.fread(&addr, 2);
- addr = LITTLE_ENDIANIZE_INT16(addr);
+ addr = little_endianize_int16(addr);
image.fread(&size, 2);
- size = LITTLE_ENDIANIZE_INT16(size);
+ size = little_endianize_int16(size);
image.fread(&ident, 1);
logerror("mekd2 rom load: $%04X $%04X $%02X\n", addr, size, ident);
while (size-- > 0)
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index 6f5aef5d5bb..9e10bef4773 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -4095,9 +4095,9 @@ static void chunky_to_planar(memory_region *rgn)
for (int i = 0; i < len; i++)
{
- UINT32 data = LITTLE_ENDIANIZE_INT32(ROM[i]);
+ UINT32 data = little_endianize_int32(ROM[i]);
data = BITSWAP32(data,31,27,23,19,15,11,7,3,30,26,22,18,14,10,6,2,29,25,21,17,13,9,5,1,28,24,20,16,12,8,4,0);
- ROM[i] = LITTLE_ENDIANIZE_INT32(data);
+ ROM[i] = little_endianize_int32(data);
}
}
diff --git a/src/mame/machine/cbm_snqk.cpp b/src/mame/machine/cbm_snqk.cpp
index e066aa8e262..348f252432f 100644
--- a/src/mame/machine/cbm_snqk.cpp
+++ b/src/mame/machine/cbm_snqk.cpp
@@ -66,7 +66,7 @@ int general_cbm_loadsnap( device_image_interface &image, const char *file_type,
}
image.fread( &address, 2);
- address = LITTLE_ENDIANIZE_INT16(address);
+ address = little_endianize_int16(address);
if (!core_stricmp(file_type, "t64"))
address = 2049;
snapshot_size -= 2;
diff --git a/src/mame/machine/decocrpt.cpp b/src/mame/machine/decocrpt.cpp
index 3ada025a017..680481a3e52 100644
--- a/src/mame/machine/decocrpt.cpp
+++ b/src/mame/machine/decocrpt.cpp
@@ -610,7 +610,7 @@ static void deco_decrypt(running_machine &machine,const char *rgntag,const UINT8
/* we work on 16-bit words but data is loaded as 8-bit, so swap bytes on LSB machines */
if (ENDIANNESS_NATIVE == ENDIANNESS_LITTLE)
for (i = 0;i < len;i++)
- rom[i] = BIG_ENDIANIZE_INT16(rom[i]);
+ rom[i] = big_endianize_int16(rom[i]);
memcpy(&buffer[0],rom,len*2);
@@ -644,7 +644,7 @@ static void deco_decrypt(running_machine &machine,const char *rgntag,const UINT8
/* we work on 16-bit words but data is loaded as 8-bit, so swap bytes on LSB machines */
if (ENDIANNESS_NATIVE == ENDIANNESS_LITTLE)
for (i = 0;i < len;i++)
- rom[i] = BIG_ENDIANIZE_INT16(rom[i]);
+ rom[i] = big_endianize_int16(rom[i]);
}
void deco56_decrypt_gfx(running_machine &machine, const char *tag)
diff --git a/src/mame/machine/fddebug.cpp b/src/mame/machine/fddebug.cpp
index a384512642d..22276a29f66 100644
--- a/src/mame/machine/fddebug.cpp
+++ b/src/mame/machine/fddebug.cpp
@@ -600,7 +600,7 @@ static void load_overlay_file(running_machine &machine)
/* convert from big-endian */
for (pcaddr = 0; pcaddr < keystatus_words; pcaddr++)
- keystatus[pcaddr] = BIG_ENDIANIZE_INT16(keystatus[pcaddr]) & ~SEARCH_MASK;
+ keystatus[pcaddr] = big_endianize_int16(keystatus[pcaddr]) & ~SEARCH_MASK;
}
/* mark the key dirty */
@@ -624,14 +624,14 @@ static void save_overlay_file(running_machine &machine)
{
/* convert to big-endian */
for (pcaddr = 0; pcaddr < keystatus_words; pcaddr++)
- keystatus[pcaddr] = BIG_ENDIANIZE_INT16(keystatus[pcaddr]);
+ keystatus[pcaddr] = big_endianize_int16(keystatus[pcaddr]);
/* write the data */
file.write(keystatus, keystatus_words * 2);
/* convert from big-endian */
for (pcaddr = 0; pcaddr < keystatus_words; pcaddr++)
- keystatus[pcaddr] = BIG_ENDIANIZE_INT16(keystatus[pcaddr]);
+ keystatus[pcaddr] = big_endianize_int16(keystatus[pcaddr]);
}
}
diff --git a/src/mame/machine/z80bin.cpp b/src/mame/machine/z80bin.cpp
index ac18c8e7e11..d058ea613db 100644
--- a/src/mame/machine/z80bin.cpp
+++ b/src/mame/machine/z80bin.cpp
@@ -51,9 +51,9 @@ int z80bin_load_file(device_image_interface *image, address_space &space, const
return IMAGE_INIT_FAIL;
}
- exec_addr[0] = LITTLE_ENDIANIZE_INT16(args[0]);
- start_addr[0] = LITTLE_ENDIANIZE_INT16(args[1]);
- end_addr[0] = LITTLE_ENDIANIZE_INT16(args[2]);
+ exec_addr[0] = little_endianize_int16(args[0]);
+ start_addr[0] = little_endianize_int16(args[1]);
+ end_addr[0] = little_endianize_int16(args[2]);
size = (end_addr[0] - start_addr[0] + 1) & 0xffff;