summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/ssem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ssem.cpp')
-rw-r--r--src/mame/drivers/ssem.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/mame/drivers/ssem.cpp b/src/mame/drivers/ssem.cpp
index a36d8d09916..b108c9cfee3 100644
--- a/src/mame/drivers/ssem.cpp
+++ b/src/mame/drivers/ssem.cpp
@@ -24,21 +24,21 @@ public:
virtual void machine_start() override;
virtual void machine_reset() override;
- UINT32 screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_INPUT_CHANGED_MEMBER(panel_check);
DECLARE_QUICKLOAD_LOAD_MEMBER(ssem_store);
- inline UINT32 reverse(UINT32 v);
+ inline uint32_t reverse(uint32_t v);
void strlower(char *buf);
private:
template <typename Format, typename... Params>
- void glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fmt, Params &&...args);
+ void glyph_print(bitmap_rgb32 &bitmap, int32_t x, int32_t y, Format &&fmt, Params &&...args);
required_device<ssem_device> m_maincpu;
- required_shared_ptr<UINT8> m_store;
+ required_shared_ptr<uint8_t> m_store;
required_device<screen_device> m_screen;
- UINT8 m_store_line;
+ uint8_t m_store_line;
util::ovectorstream m_glyph_print_buf;
};
@@ -53,7 +53,7 @@ private:
// The de facto snapshot format for other SSEM simulators stores the data physically in that format as well.
// Therefore, in MESS, every 32-bit word has its bits reversed, too, and as a result the values must be
// un-reversed before being used.
-inline UINT32 ssem_state::reverse(UINT32 v)
+inline uint32_t ssem_state::reverse(uint32_t v)
{
// Taken from http://www.graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
// swap odd and even bits
@@ -102,11 +102,11 @@ enum
INPUT_CHANGED_MEMBER(ssem_state::panel_check)
{
- UINT8 edit0_state = ioport("EDIT0")->read();
- UINT8 edit1_state = ioport("EDIT1")->read();
- UINT8 edit2_state = ioport("EDIT2")->read();
- UINT8 edit3_state = ioport("EDIT3")->read();
- UINT8 misc_state = ioport("MISC")->read();
+ uint8_t edit0_state = ioport("EDIT0")->read();
+ uint8_t edit1_state = ioport("EDIT1")->read();
+ uint8_t edit2_state = ioport("EDIT2")->read();
+ uint8_t edit3_state = ioport("EDIT3")->read();
+ uint8_t misc_state = ioport("MISC")->read();
switch( (int)(uintptr_t)param )
{
@@ -279,7 +279,7 @@ INPUT_PORTS_END
* Video hardware *
\****************************************************/
-static const UINT8 char_glyphs[0x80][8] =
+static const uint8_t char_glyphs[0x80][8] =
{
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00 },
@@ -412,7 +412,7 @@ static const UINT8 char_glyphs[0x80][8] =
};
template <typename Format, typename... Params>
-void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fmt, Params &&...args)
+void ssem_state::glyph_print(bitmap_rgb32 &bitmap, int32_t x, int32_t y, Format &&fmt, Params &&...args)
{
const rectangle &visarea = m_screen->visible_area();
@@ -423,14 +423,14 @@ void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fm
for(char const *buf = &m_glyph_print_buf.vec()[0]; *buf; buf++)
{
- UINT8 cur = UINT8(*buf);
+ uint8_t cur = uint8_t(*buf);
if(cur < 0x80)
{
- INT32 line = 0;
+ int32_t line = 0;
for(line = 0; line < 8; line++)
{
- UINT32 *d = &bitmap.pix32(y + line);
- INT32 bit = 0;
+ uint32_t *d = &bitmap.pix32(y + line);
+ int32_t bit = 0;
for(bit = 0; bit < 8; bit++)
{
if(char_glyphs[cur][line] & (1 << (7 - bit)))
@@ -458,12 +458,12 @@ void ssem_state::glyph_print(bitmap_rgb32 &bitmap, INT32 x, INT32 y, Format &&fm
}
}
-UINT32 ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+uint32_t ssem_state::screen_update_ssem(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- UINT32 line = 0;
- UINT32 accum = m_maincpu->state_int(SSEM_A);
- UINT32 bit = 0;
- UINT32 word = 0;
+ uint32_t line = 0;
+ uint32_t accum = m_maincpu->state_int(SSEM_A);
+ uint32_t bit = 0;
+ uint32_t word = 0;
for(line = 0; line < 32; line++)
{
@@ -541,7 +541,7 @@ QUICKLOAD_LOAD_MEMBER(ssem_state, ssem_store)
{
for (int i = 0; i < num_lines; i++)
{
- UINT32 line = 0;
+ uint32_t line = 0;
image.fgets(image_line, 99);
// Isolate and convert 4-digit decimal address
@@ -551,7 +551,7 @@ QUICKLOAD_LOAD_MEMBER(ssem_state, ssem_store)
if (image.is_filetype("snp"))
{
- UINT32 word = 0;
+ uint32_t word = 0;
// Parse a line such as: 0000:00000110101001000100000100000100
for (int b = 0; b < 32; b++)
@@ -568,9 +568,9 @@ QUICKLOAD_LOAD_MEMBER(ssem_state, ssem_store)
else if (image.is_filetype("asm"))
{
char op_buf[4] = { 0 };
- INT32 value = 0;
- UINT32 unsigned_value = 0;
- UINT32 word = 0;
+ int32_t value = 0;
+ uint32_t unsigned_value = 0;
+ uint32_t word = 0;
// Isolate the opcode and convert to lower-case
memcpy(op_buf, image_line + 5, 3);
@@ -579,7 +579,7 @@ QUICKLOAD_LOAD_MEMBER(ssem_state, ssem_store)
// Isolate the value
sscanf(image_line + 9, "%d", &value);
- unsigned_value = reverse((UINT32)value);
+ unsigned_value = reverse((uint32_t)value);
if (!core_stricmp(op_buf, "num"))
word = unsigned_value;