Skip to content

Commit 7783fc6

Browse files
author
Adam
committed
- use u8 not uint8_t
- document how tek4404 maps to nvram
1 parent c82e4c5 commit 7783fc6

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

src/mame/tektronix/tek440x.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ class tek440x_state : public driver_device
113113
void sound_w(u8 data);
114114
void diag_w(u8 data);
115115

116-
uint8_t nvram_r(offs_t offset);
116+
u8 nvram_r(offs_t offset);
117117
void nvram_w(offs_t offset, u8 data);
118-
uint8_t recall_r();
118+
u8 recall_r();
119119
void recall_w(uint8_t data);
120-
uint8_t store_r();
120+
u8 store_r();
121121
void store_w(uint8_t data);
122122

123123

@@ -325,24 +325,24 @@ void tek440x_state::kb_tdata_w(int state)
325325
}
326326

327327

328-
uint8_t tek440x_state::nvram_r(offs_t offset)
328+
u8 tek440x_state::nvram_r(offs_t offset)
329329
{
330330
u8 data = m_novram->read(m_maincpu->space(0), offset);
331331

332-
LOG("nvram_r(%d) => %02x pc(%08x)\n",offset, data, m_maincpu->pc());
332+
LOG("nvram_r(%d) => %02x pc(%08x)\n", offset, data, m_maincpu->pc());
333333

334334
// kick it up to top 4 bits
335335
return data << 4;
336336
}
337337
void tek440x_state::nvram_w(offs_t offset, u8 data)
338338
{
339-
LOG("nvram_w(%d) <= %02x\n",offset, data);
339+
LOG("nvram_w(%d) <= %02x\n", offset, data);
340340

341341
// duplicate in lower 4 bits
342342
m_novram->write(offset, data | (data >> 4));
343343
}
344344

345-
uint8_t tek440x_state::recall_r()
345+
u8 tek440x_state::recall_r()
346346
{
347347
LOG("recall_r\n");
348348
if (!machine().side_effects_disabled())
@@ -354,14 +354,14 @@ uint8_t tek440x_state::recall_r()
354354
return 0xff;
355355
}
356356

357-
void tek440x_state::recall_w(uint8_t data)
357+
void tek440x_state::recall_w(u8 data)
358358
{
359359
LOG("recall_w\n");
360360
m_novram->recall(1);
361361
m_novram->recall(0);
362362
}
363363

364-
uint8_t tek440x_state::store_r()
364+
u8 tek440x_state::store_r()
365365
{
366366
LOG("store_r\n");
367367
if (!machine().side_effects_disabled())
@@ -394,9 +394,10 @@ void tek440x_state::physical_map(address_map &map)
394394
// 700000-71ffff spare 0
395395
// 720000-73ffff spare 1
396396
map(0x740000, 0x747fff).rom().mirror(0x8000).region("maincpu", 0);
397+
// maps 128 address range to nvram (see p2.8-3)
397398
// 721000-72107f net ram
398-
// 722000-721fff nvram nybbles
399399
map(0x721000, 0x7210ff).rw(FUNC(tek440x_state::nvram_r), FUNC(tek440x_state::nvram_w));
400+
// 722000-722fff nvram nybbles
400401
map(0x722000, 0x722fff).rw(FUNC(tek440x_state::recall_r), FUNC(tek440x_state::recall_w));
401402
map(0x723000, 0x723fff).rw(FUNC(tek440x_state::store_r), FUNC(tek440x_state::store_w));
402403

0 commit comments

Comments
 (0)