Miscellaneous cleanup:

* mame/namcos22.h: Use common helpers for integer manipulation, more
  appropriate use of inline/static/constexpr.
* bus/gio64/newport.cpp: Changed a couple instances of K&R formatting
  that snuck in to Allman like the rest of the file.
* bus/gameboy/gbxfile.h: Added comment about another use of GBX footer
  "extra data".
This commit is contained in:
Vas Crabb 2022-11-16 04:16:52 +11:00
parent faf67cc2ef
commit f96f2555cf
3 changed files with 19 additions and 10 deletions

View File

@ -32,6 +32,11 @@
Vast Fame VF001 (FourCC 'VF01') additional data:
* Command preload value (1 byte).
Kong Feng DSH-GGB81 (FourCC 'GB81') additional data:
* Cartridge/PCB type (1 byte):
- 0x00: DSH-GGB81
- 0x01: BC-R1616T3P
The list of cartridge type FourCC values here is incomplete.
***************************************************************************/

View File

@ -913,7 +913,8 @@ void rb2_device::deserialize(FILE *file)
uint32_t rb2_device::expand_to_all_lanes(uint32_t src)
{
switch (m_draw_depth) {
switch (m_draw_depth)
{
case 0:
src |= src << 4;
src |= src << 8;
@ -2726,7 +2727,8 @@ void newport_base_device::do_setup(void)
const int32_t dy = abs(y1 - y2);
const uint8_t adrmode = (m_rex3.m_draw_mode0 >> 2) & 7;
if (adrmode >= 0 && adrmode <= 1) {
if (adrmode >= 0 && adrmode <= 1)
{
/* quadrant for block or span */
uint8_t quadrant = 0;
/* This is purely guessed */
@ -2746,7 +2748,9 @@ void newport_base_device::do_setup(void)
}
m_rex3.m_bres_octant_inc1 &= ~(0x7 << 24);
m_rex3.m_bres_octant_inc1 |= quadrant << 24;
} else if (adrmode >= 2 && adrmode <= 4) {
}
else if (adrmode >= 2 && adrmode <= 4)
{
uint8_t octant;
/* octant for line */
/* FIXME: error terms and Bresenham terms */

View File

@ -328,15 +328,15 @@ protected:
u16 mcuc74_speedup_r();
void mcu_speedup_w(offs_t offset, u16 data, u16 mem_mask = ~0);
inline u8 nthbyte(const u32 *src, int n) { return (src[n / 4] << ((n & 3) * 8)) >> 24; }
inline u16 nthword(const u32 *src, int n) { return (src[n / 2] << ((n & 1) * 16)) >> 16; }
static u8 nthbyte(const u32 *src, int n) { return util::big_endian_cast<u8>(src)[n]; }
static u16 nthword(const u32 *src, int n) { return util::big_endian_cast<u16>(src)[n];; }
inline s32 signed12(s32 val) { return (val & 0x00000800) ? (s32)(val | 0xfffff000) : val & 0x000007ff; }
inline s32 signed18(s32 val) { return (val & 0x00020000) ? (s32)(val | 0xfffc0000) : val & 0x0001ffff; }
inline s32 signed24(s32 val) { return (val & 0x00800000) ? (s32)(val | 0xff000000) : val & 0x007fffff; }
static constexpr s32 signed12(s32 val) { return util::sext(val, 12); }
static constexpr s32 signed18(s32 val) { return util::sext(val, 18); }
static constexpr s32 signed24(s32 val) { return util::sext(val, 24); }
inline float dspfixed_to_nativefloat(s16 val) { return val / (float)0x7fff; }
float dspfloat_to_nativefloat(u32 val);
static constexpr float dspfixed_to_nativefloat(s16 val) { return val / (float)0x7fff; }
static float dspfloat_to_nativefloat(u32 val);
void handle_driving_io();
void handle_coinage(u16 flags);