mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00

Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
// license:BSD-3-Clause
|
|
// copyright-holders:Aaron Giles
|
|
/***************************************************************************
|
|
|
|
coreutil.h
|
|
|
|
Miscellaneous utility code
|
|
|
|
***************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#ifndef __COREUTIL_H__
|
|
#define __COREUTIL_H__
|
|
|
|
#include "osdcomm.h"
|
|
|
|
|
|
/***************************************************************************
|
|
BINARY CODED DECIMAL HELPERS
|
|
***************************************************************************/
|
|
|
|
int bcd_adjust(int value);
|
|
uint32_t dec_2_bcd(uint32_t a);
|
|
uint32_t bcd_2_dec(uint32_t a);
|
|
|
|
|
|
/***************************************************************************
|
|
GREGORIAN CALENDAR HELPERS
|
|
***************************************************************************/
|
|
|
|
int gregorian_is_leap_year(int year);
|
|
int gregorian_days_in_month(int month, int year);
|
|
|
|
|
|
/***************************************************************************
|
|
MISC
|
|
***************************************************************************/
|
|
|
|
void rand_memory(void *memory, size_t length);
|
|
|
|
uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len);
|
|
|
|
#endif /* __COREUTIL_H__ */
|