mirror of
https://github.com/holub/mame
synced 2025-06-29 23:48:56 +03:00
coreutil: remove single-use (and savestate unsafe) rand_memory function (nw)
This commit is contained in:
parent
602d266bcf
commit
23c70e8b60
@ -391,7 +391,9 @@ void cosmac_device::device_reset()
|
|||||||
set_q_flag(0);
|
set_q_flag(0);
|
||||||
m_df = 0;
|
m_df = 0;
|
||||||
m_p = 0;
|
m_p = 0;
|
||||||
rand_memory(m_r, sizeof(m_r));
|
|
||||||
|
for (int i = 0; i < ARRAY_LENGTH(m_r); i++)
|
||||||
|
m_r[i] = machine().rand() & 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,29 +62,6 @@ uint32_t bcd_2_dec(uint32_t a)
|
|||||||
MISC
|
MISC
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/**
|
|
||||||
* @fn void rand_memory(void *memory, size_t length)
|
|
||||||
*
|
|
||||||
* @brief Random memory.
|
|
||||||
*
|
|
||||||
* @param [in,out] memory If non-null, the memory.
|
|
||||||
* @param length The length.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void rand_memory(void *memory, size_t length)
|
|
||||||
{
|
|
||||||
static uint32_t seed = 0;
|
|
||||||
uint8_t *bytes = (uint8_t *) memory;
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < length; i++)
|
|
||||||
{
|
|
||||||
seed = seed * 214013 + 2531011;
|
|
||||||
bytes[i] = (uint8_t) (seed >> 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len)
|
uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len)
|
||||||
{
|
{
|
||||||
return crc32(crc, buf, len);
|
return crc32(crc, buf, len);
|
||||||
|
@ -77,8 +77,6 @@ inline int gregorian_days_in_month(int month, int year)
|
|||||||
MISC
|
MISC
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
void rand_memory(void *memory, size_t length);
|
|
||||||
|
|
||||||
uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len);
|
uint32_t core_crc32(uint32_t crc, const uint8_t *buf, uint32_t len);
|
||||||
|
|
||||||
#endif // MAME_UTIL_COREUTIL_H
|
#endif // MAME_UTIL_COREUTIL_H
|
||||||
|
@ -17,7 +17,7 @@ TODO:
|
|||||||
Hardware notes:
|
Hardware notes:
|
||||||
- КР1810ВМ86 (i8086 clone), 16200K XTAL
|
- КР1810ВМ86 (i8086 clone), 16200K XTAL
|
||||||
- КР1810ГФ84 (i8284 clock divider /3)
|
- КР1810ГФ84 (i8284 clock divider /3)
|
||||||
- 2*КР537РУ10 (2KB*8 RAM), 2*8KB ROM
|
- 2*КР537РУ10 (2KB*8 RAM), 2*КС573РФ4А or similar (8KB ROM)
|
||||||
- lcd panel (4 7seg digits), 64 chessboard buttons, 16 leds
|
- lcd panel (4 7seg digits), 64 chessboard buttons, 16 leds
|
||||||
|
|
||||||
A bit more detailed, list of other Soviet standard TTL chips used and their equivalents:
|
A bit more detailed, list of other Soviet standard TTL chips used and their equivalents:
|
||||||
|
@ -408,11 +408,11 @@ ROM_END
|
|||||||
Game drivers
|
Game drivers
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* YEAR, NAME, PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
|
/* YEAR, NAME, PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
|
||||||
CONS( 1984, glasgow, 0, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto III S Glasgow", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1984, glasgow, 0, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener & Glaser", "Mephisto III-S Glasgow", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
CONS( 1985, amsterd, 0, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto Amsterdam", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1985, amsterd, 0, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser", "Mephisto Amsterdam", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
CONS( 1986, dallas, glasgow, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto Dallas", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1986, dallas, glasgow, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener & Glaser", "Mephisto Dallas", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
CONS( 1986, dallas16, amsterd, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto Dallas 16 Bit", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1986, dallas16, amsterd, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser", "Mephisto Dallas 16 Bit", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
CONS( 1986, dallas32, amsterd, 0, dallas32, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto Dallas 32 Bit", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1986, dallas32, amsterd, 0, dallas32, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser", "Mephisto Dallas 32 Bit", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
CONS( 1987, roma, amsterd, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto Roma", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1987, roma, amsterd, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser", "Mephisto Roma", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
CONS( 1987, roma32, amsterd, 0, dallas32, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser Muenchen", "Mephisto Roma 32 Bit", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
CONS( 1987, roma32, amsterd, 0, dallas32, new_keyboard, amsterd_state, empty_init, "Hegener & Glaser", "Mephisto Roma 32 Bit", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
|
||||||
|
Loading…
Reference in New Issue
Block a user