Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tek4404 work_in_progress. #12574

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
8528654
- corrected to use MONOCHROME_INVERTED
May 29, 2024
ef182a0
- added logging of LEDs on write to 0x740000
Jun 2, 2024
5d37447
- fix for memory sizing tests
Jun 5, 2024
fc52615
- removed nomem_r; just need to test memory bounds wrt *word* offset
Jun 6, 2024
df797db
- Display control selftest now passes; no idea what bit 4,5 & 6 repre…
Jun 6, 2024
8d08cc7
- map_w tests WRenable before writing
Jun 8, 2024
2060c50
- added a MAXRAM define to me able select +1MB ram option or +3MB ram…
Jun 8, 2024
9cd9585
- if FC2 do not do address translation; supervisor is pa
Jun 9, 2024
0081ee7
- added a (required_device) acia device
Jun 9, 2024
c847168
- wip getting MMU map_control bits right; we get all the way to VM se…
Jun 11, 2024
30dbf25
- pmackinlay helped decode SysWrEn logic, now passes Virtual Mem sel…
Jun 12, 2024
b286c73
- fixed mouse button mappings for left,middle,right
Jun 12, 2024
b81924b
- seems to be relying on timer IRQ
Jun 12, 2024
1cc5e70
- added timer IRQ.. I think...
Jun 12, 2024
2968c1c
- enable duart loopback mode iff m_diag & 0x80. Keyboard Interface s…
Jun 13, 2024
d7025af
- input merger of cnt1 and cnt2 to assert IRQ1
Jun 14, 2024
9551b51
- removed unused experiment
Jun 14, 2024
7d4902b
- cleaning up more experiments
Jun 14, 2024
aeebd63
- videoaddr is 16-bit reads/writes
Jun 14, 2024
9e4419d
- made irq1 latch state a member var (m_u244latch)
Jun 15, 2024
99c07d9
- added atari ST graycode mouse processing but I think 4404 is expect…
Jun 15, 2024
8faaa90
- added pretty LEDs at the bottom of the display that are located ins…
Jun 16, 2024
4b011ef
- nicer layout of LEDs
Jun 17, 2024
cdfbb3c
- explicit first value as we use it for array indexing
Jun 17, 2024
e2bb950
- fixed wrong log message for cascading TCs
Jun 18, 2024
f1fa8bb
- wip
Jun 19, 2024
ff09b08
- more comments
Jun 20, 2024
f1c5eec
- .noprw() for 0x80004000-0xffffffff since selftest blasts writes at…
Jun 22, 2024
386f887
- added derived ncr5385 that blinks an LED during activity
Jun 22, 2024
8b014e3
- renamed to attachLED()
Jun 23, 2024
4feadb3
- fixed xtal for RTC to 32768 Hz
Jun 23, 2024
57ee182
- honour Invert Video by flipping bits in screen_update
Jun 25, 2024
e2ecb3c
- tek4404 selftest writes 0xff as command (invalid command) and expec…
Jun 26, 2024
d34ec8a
- some readability tweaks
Jun 27, 2024
8bfa583
- wip mouse reading; unclear how it expects m_diag to be mixed in
Jun 28, 2024
bcf58c1
- wrapping logerror() with LOGWARN macro
Jun 30, 2024
8f10a65
- disable logging
Jun 30, 2024
2a35293
- remove test logging
Jun 30, 2024
a6691ec
- is there something not right on completing a DATA OUT operation? T…
Jul 14, 2024
838a3cc
- added some more LOG_MOED and LOG_TC logging
Jul 14, 2024
ab4be48
- added more logging
Jul 14, 2024
e2e08e9
- fixing formatting
Jul 14, 2024
9869880
- removed derived led_ncr5385
Jul 15, 2024
8451824
- log device status lines in the same order as controller lines for m…
Aug 17, 2024
7b2ec04
- page PID == 0 does not do page protection
Aug 17, 2024
b33c7d5
- more logging
Aug 17, 2024
811abc0
- adding a 5ms delay before raising BUS_SERVICE on XFI_OUT_REQ allows…
Aug 24, 2024
ff2bae0
- getting back to passing selftest again; hunch is the VM mapping is …
Aug 25, 2024
1ec7595
- reading videocntl_r returns hblank status too
Aug 26, 2024
0338468
- removed hacked extra state and add a 3.5ms delay after XFI_OUT_ACK
Aug 26, 2024
f8dcc78
- added m_latched_map_control in front of write to m_map_control that…
Aug 30, 2024
0158a20
- turn off spammy logging
Aug 30, 2024
2412266
- wip but passes selftest and begins booting; is there some uninitia…
Aug 30, 2024
671a00a
- need to clear m_latched_map_control so we dont keep copying..
Aug 30, 2024
a38b1f9
- cleaning up
Aug 31, 2024
d5c956c
- added m68010_tekmmu_device that implements memory_translate()
Aug 31, 2024
53874d3
- Tek4404 needs 3.5 us (not ms!) delay to allow controller to see IRQ…
Sep 28, 2024
48150f3
- USE_MMU to perform mmu translation inside m_write/m_read etc
Sep 28, 2024
1e78bc9
- log every non-zero PTe
Oct 8, 2024
55699c8
- trying to use m_readimm16 etc; does not get as far as simple hacki…
Oct 10, 2024
3a866bc
- trying to fix mmu_translate_address.. still fails selftest whewreas…
Oct 10, 2024
2d04970
- formatting
Oct 15, 2024
a2a0f4d
- get_fc() does not return SR, need to use register variable m_s_flag..
Oct 26, 2024
9450a2a
- use m_s_flag not get_fc()
Oct 28, 2024
06a36cc
- don't make special case of PID=0; selftest fails with it!
Oct 30, 2024
57283db
- usec not nsec!
Oct 30, 2024
d035a83
- wip to add internal_map to m68010_tekmmu_device predicated on USE_I…
Nov 10, 2024
e8a567c
- use is_user() method for determining whether to use MMU
Nov 10, 2024
82043cd
- removed is_user() since we know get_fc() works as expected
Nov 19, 2024
3a18144
- without masking out bits before regenerating, Uniflex does not boot
Dec 22, 2024
67dd0dd
- fixed wrong log message for cascading TCs
Jun 18, 2024
76c249d
- fixing formatting
Jul 14, 2024
7c02b48
- added m68010_tekmmu_device that implements memory_translate()
Aug 31, 2024
d8590c9
- restoring SCSI_BUS_SKEW that was changed..
Dec 22, 2024
baaf836
- bad merge
Dec 22, 2024
935d59d
- wip but with fixes from @shattered, now boots and gets to login prompt
Dec 27, 2024
5c3731f
- swapped back Capslock and Ctrl to allow Ctrl key to work in Tek4404
Dec 28, 2024
a7fcf71
- fixes for gating VBenable as suggested by @shattered
Dec 28, 2024
7eefa12
- removed masking as its already in master for some reason..
Dec 29, 2024
b05f100
- dont wait for 250 timeout (@shattered fix); hugely increases HD per…
Dec 29, 2024
9834d64
- less spammy logging
Jan 4, 2025
d667594
- mouse input kinda works (thanks Phil)
Jan 4, 2025
e162cc9
- fixed fine scrolling
Jan 4, 2025
13ce483
- LOG_MMU for map_rw
Jan 4, 2025
9f43ba2
- video address panning almost works; something wrong with vertical s…
Jan 4, 2025
01f052e
- nvram stored as 4-bit nybbles (used for MAC address)
Jan 5, 2025
bc5abae
- page 2.1-52 shows WrMapEn coming directly from latch
Jan 14, 2025
5aa8d59
- wip of NS32081 interface
Jan 14, 2025
6e8d18b
- copy m_latched_map_control => m_map_control on every user access
Jan 14, 2025
74f45a6
- ns32081 interface seems to work
Jan 16, 2025
6d31c99
less spammy
Jan 16, 2025
5d4712e
- fpu_latch... returns enum of result type
Jan 17, 2025
59a0453
- disable video panning for now; something not right with address calc
Jan 17, 2025
ee3acf6
- switched to using device/machine/ns32081 for fpu support
Jan 17, 2025
e5e8a25
- easier to read logging of MMU state changes
Jan 19, 2025
f74a066
- TEMP disable cancelling bus error iff during prefetch; seems to mak…
Jan 19, 2025
b97c9c8
- when doing prefetch, we need to save/restore DA just as we do for r…
Jan 19, 2025
61c9640
- tweaks to keyboard mapping to make them work
Jan 19, 2025
e5ae753
- removed MACHINE_NOT_WORKING Woot!
Jan 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/devices/cpu/m68000/m68010.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ m68010_device::m68010_device(const machine_config &mconfig, const char *tag, dev
{
}

m68010_device::m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map)
: m68000_musashi_device(mconfig, tag, owner, clock, M68010, 16,24, internal_map)
{
}

void m68010_device::device_start()
{
m68000_musashi_device::device_start();
Expand Down
1 change: 1 addition & 0 deletions src/devices/cpu/m68000/m68010.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class m68010_device : public m68000_musashi_device
public:
// construction/destruction
m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map);

virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;

Expand Down
21 changes: 19 additions & 2 deletions src/devices/cpu/m68000/m68kcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,28 @@ inline u32 m68ki_read_imm_16()
result = MASK_OUT_ABOVE_16(m_pref_data);
m_pc += 2;
if (!m_mmu_tmp_buserror_occurred) {

u32 tmp_dar[16];
for (int i = 15; i >= 0; i--)
{
tmp_dar[i] = REG_DA()[i];
}

// prefetch only if no bus error occurred in opcode fetch
m_pref_data = m68ki_ic_readimm16(m_pc);
m_pref_addr = m_mmu_tmp_buserror_occurred ? ~0 : m_pc;
// ignore bus error on prefetch
m_mmu_tmp_buserror_occurred = 0;

// restore cpu address registers to value at start of instruction
if (m_mmu_tmp_buserror_occurred)
for (int i = 15; i >= 0; i--)
{
if (REG_DA()[i] != tmp_dar[i])
{
REG_DA()[i] = tmp_dar[i];
}
}


}

return result;
Expand Down
49 changes: 36 additions & 13 deletions src/devices/machine/am9513.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@
#define LOG_MODE (1U << 1)
#define LOG_INPUT (1U << 2)
#define LOG_TC (1U << 3)
#define LOG_WARN (1U << 4)

//#define VERBOSE (LOG_GENERAL | LOG_MODE)
//#define VERBOSE -1

#include "logmacro.h"

#define LOGWARN(...) LOGMASKED(LOG_WARN, "WARNING: " __VA_ARGS__)


//**************************************************************************
// TYPE DEFINITIONS
Expand Down Expand Up @@ -448,7 +453,7 @@ void am9513_device::set_counter_mode(int c, u16 data)
}

if ((data & 0x0018) != (m_counter_mode[c] & 0x0018))
LOGMASKED(LOG_MODE, "Counter %d: %s %s count\n", c + 1, BIT(data, 4) ? "BCD" : "Binary", BIT(data, 3) ? "up" : "down");
LOGMASKED(LOG_MODE, "Counter %d: %s %s count %s\n", c + 1, BIT(data, 4) ? "BCD" : "Binary", BIT(data, 3) ? "up" : "down", BIT(data, 5) ? "repetitively" : "once");

if ((data & 0x0007) != (m_counter_mode[c] & 0x0007))
{
Expand Down Expand Up @@ -620,8 +625,13 @@ void am9513_device::set_tc(int c, bool state)

// TC cascading
if ((m_counter_mode[d] & 0x1f00) == (state ? 0x0000 : 0x1000))
{
LOGMASKED(LOG_TC, "Counter %d: TC cascade Next Count %u \n", c + 1, m_count[d]);

count_edge(d);

}

// TC gating
if ((m_counter_mode[d] & 0xe000) == 0x2000)
gate_count(d, state && (bus_is_16_bit() || m_gate_alt[d]));
Expand Down Expand Up @@ -976,7 +986,7 @@ void am9513_device::write_gate_alt(int c, bool level)
{
if (bus_is_16_bit())
{
logerror("Gate %dA written when configured as DB%d\n", c + 1, c + 8);
LOGWARN("Gate %dA written when configured as DB%d\n", c + 1, c + 8);
return;
}

Expand Down Expand Up @@ -1102,7 +1112,7 @@ void am9513_device::internal_write(u16 data)
set_master_mode(data);
break;
case 0x1f: // Status register (read only?)
logerror("Writing %04X to status register\n", data);
LOGWARN("Writing %04X to status register\n", data);
break;
case 0x07: // Alarm 1 register
case 0x0f: // Alarm 2 register
Expand Down Expand Up @@ -1138,7 +1148,7 @@ void am9513_device::internal_write(u16 data)
m_counter_hold[(m_dpr & 7) - 1] = data;
break;
default: // Invalid register
logerror("Writing %04X to register %02X\n", data, m_dpr);
LOGWARN("Writing %04X to register %02X\n", data, m_dpr);
break;
}
}
Expand Down Expand Up @@ -1217,7 +1227,7 @@ void am9513_device::command_write(u8 data)
case 0x00:
if ((data & 0x07) == 0x00 || (data & 0x07) == 0x06)
{
logerror("Invalid register selected: %02X\n", data);
LOGWARN("Invalid register selected: %02X\n", data);
break;
}

Expand All @@ -1238,7 +1248,10 @@ void am9513_device::command_write(u8 data)
if (BIT(data, 6))
step_counter(c, true);
if (BIT(data, 5))
{
LOGMASKED(LOG_MODE, "Arm Counter %d\n", c + 1);
arm_counter(c);
}
}
}
break;
Expand All @@ -1251,9 +1264,15 @@ void am9513_device::command_write(u8 data)
if (BIT(data, c))
{
if (!BIT(data, 5))
{
LOGMASKED(LOG_MODE, "Disarm Counter %d\n", c + 1);
disarm_counter(c);
}
if (!BIT(data, 6))
{
LOGMASKED(LOG_MODE, "Save Counter %d\n", c + 1);
save_counter(c);
}
}
}
break;
Expand All @@ -1270,20 +1289,23 @@ void am9513_device::command_write(u8 data)
case 0xe3: case 0xeb: // Clear/set toggle out for counter 3
case 0xe4: case 0xec: // Clear/set toggle out for counter 4
case 0xe5: case 0xed: // Clear/set toggle out for counter 5
LOGMASKED(LOG_MODE, "Counter %d: %s output\n", data & 7, BIT(data, 3) ? "Set" : "Clear");
set_toggle((data & 7) - 1, BIT(data, 3));
break;
case 0xe6: case 0xee: // Clear/set MM12 (FOUT gate on/FOUT gate off)
LOGMASKED(LOG_MODE, "FOUT: Gate %s\n", BIT(data, 3) ? "Off" : "On");
m_mmr = ((m_mmr & ~(1 << 12)) | BIT(data, 3) << 12);
break;
case 0xe7: case 0xef: // Clear/set MM13 (8-bit bus/16-bit bus)
LOGMASKED(LOG_MODE, "Data Bus Width = %d-Bit\n", BIT(data, 3) ? 16 : 8);
m_mmr = ((m_mmr & ~(1 << 13)) | BIT(data, 3) << 13);
break;
case 0xf1: // Step counter 1
case 0xf2: // Step counter 2
case 0xf3: // Step counter 3
case 0xf4: // Step counter 4
case 0xf5: // Step counter 5
LOGMASKED(LOG_MODE, "Counter %d: Step\n", data & 7);
step_counter((data & 7) - 1, false);
break;
case 0xff: // Master reset
Expand All @@ -1298,7 +1320,7 @@ void am9513_device::command_write(u8 data)
}
[[fallthrough]];
default:
logerror("Invalid command: %02X\n", data);
LOGWARN("Invalid command: %02X\n", data);
break;
}
break;
Expand Down Expand Up @@ -1391,7 +1413,7 @@ void am9513_device::write8(offs_t offset, u8 data)
if (BIT(offset, 0))
{
if (data == 0xef)
logerror("16-bit data bus selected with 8-bit write\n");
LOGWARN("16-bit data bus selected with 8-bit write\n");
command_write(data);
}
else
Expand All @@ -1410,7 +1432,7 @@ u16 am9513_device::read16(offs_t offset)
else
{
if (!bus_is_16_bit())
logerror("16-bit data read in 8-bit bus mode\n");
LOGWARN("16-bit data read in 8-bit bus mode\n");
return data_read();
}
}
Expand All @@ -1423,19 +1445,20 @@ u16 am9513_device::read16(offs_t offset)
void am9513_device::write16(offs_t offset, u16 data)
{
if ((!bus_is_16_bit() || BIT(offset, 0)) && (data & 0xff00) != 0xff00)
logerror("Errant write of %02X to upper byte of %s register in %d-bit bus mode\n",
LOGWARN("Errant write of %02X to upper byte of %s register in %d-bit bus mode\n",
(data & 0xff00) >> 8,
BIT(offset, 0) ? "control" : "data",
bus_is_16_bit() ? 16 : 8);

if (BIT(offset, 0))
{
command_write(data & 0x00ff);

// NB testing afterwards because this command may have been changing bus width
if ((data & 0x00ff) == 0x00e7)
logerror("8-bit data bus selected with 16-bit write\n");
LOGWARN("8-bit data bus selected with 16-bit write\n");
else if ((data & 0x00ff) == 0x00ef && !bus_is_16_bit())
logerror("16-bit data bus selected\n");

command_write(data & 0x00ff);
LOGWARN("16-bit data bus selected\n");
}
else
data_write(data);
Expand Down
23 changes: 19 additions & 4 deletions src/devices/machine/ncr5385.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,18 @@ void ncr5385_device::scsi_ctrl_changed()

if ((ctrl & S_BSY) && !(ctrl & S_SEL))
{
LOGMASKED(LOG_STATE, "scsi_ctrl_changed 0x%03x phase %s%s%s\n", ctrl, nscsi_phase[ctrl & S_PHASE_MASK],
ctrl & S_REQ ? " REQ" : "", ctrl & S_ACK ? " ACK" : "");
LOGMASKED(LOG_STATE, "scsi_ctrl_changed 0x%03x phase %s%s%s pc(%s)\n", ctrl, nscsi_phase[ctrl & S_PHASE_MASK],
ctrl & S_REQ ? " REQ" : "", ctrl & S_ACK ? " ACK" : "", machine().describe_context());

if (m_state != IDLE)
m_state_timer->adjust(attotime::zero);
}
else if (ctrl & S_BSY)
{
LOGMASKED(LOG_STATE, "scsi_ctrl_changed 0x%03x arbitration/selection\n", ctrl);
if (m_state != IDLE)
m_state_timer->adjust(attotime::from_usec(40));
}
else
{
LOGMASKED(LOG_STATE, "scsi_ctrl_changed 0x%03x BUS FREE\n", ctrl);
Expand Down Expand Up @@ -352,6 +356,9 @@ void ncr5385_device::cmd_w(u8 data)
}
else
{
// we assume everything here generates an IRQ?
// assert(data & CMD_INT);

// interrupting commands
m_aux_status &= ~AUX_STATUS_DATA_FULL;
m_cmd = data;
Expand Down Expand Up @@ -477,6 +484,7 @@ void ncr5385_device::dma_w(u8 data)
m_state_timer->adjust(attotime::zero);
}


void ncr5385_device::state_timer(s32 param)
{
// step state machine
Expand Down Expand Up @@ -687,6 +695,8 @@ int ncr5385_device::state_step()
// clear ACK except after last byte of message input phase
if (!remaining() && (ctrl & S_PHASE_MASK) == S_PHASE_MSG_IN)
{
LOGMASKED(LOG_STATE, "xfi_in: INT_FUNC_COMPLETE\n" );

m_int_status |= INT_FUNC_COMPLETE;
m_state = IDLE;

Expand Down Expand Up @@ -716,7 +726,8 @@ int ncr5385_device::state_step()
}
else
{
LOGMASKED(LOG_STATE, "xfi_out: %s\n", remaining() ? "phase change" : "transfer complete");
LOGMASKED(LOG_STATE, "xfi_out: %s pc(%s)\n", remaining() ? "phase change" : "transfer complete", machine().describe_context());

m_int_status |= INT_BUS_SERVICE;
m_state = IDLE;

Expand All @@ -726,6 +737,7 @@ int ncr5385_device::state_step()
else
delay = -1;
break;

case XFI_OUT_DRQ:
m_state = XFI_OUT_ACK;
m_aux_status &= ~AUX_STATUS_DATA_FULL;
Expand Down Expand Up @@ -759,9 +771,12 @@ int ncr5385_device::state_step()
else
m_sbx = false;

delay = 3'500; // >=3.5us delay works, < 3.5us fails

// clear data and ACK
scsi_bus->data_w(scsi_refid, 0);
scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);

}
else
delay = -1;
Expand Down Expand Up @@ -820,9 +835,9 @@ void ncr5385_device::update_int()
bool const int_state = m_int_status & (INT_FUNC_COMPLETE | INT_BUS_SERVICE |
INT_DISCONNECTED | INT_SELECTED | INT_RESELECTED | INT_INVALID_CMD);

LOGMASKED(LOG_COMMAND, "update_int 0x%02x (0x%02x) pc(%s)\n", m_int_status, m_int_state, machine().describe_context());
if (m_int_state != int_state)
{
LOG("update_int %d\n", int_state);

m_aux_status &= ~(AUX_STATUS_MSG | AUX_STATUS_CD | AUX_STATUS_IO);
if (int_state)
Expand Down
12 changes: 6 additions & 6 deletions src/devices/machine/nscsi_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#define LOG_DATA (1U << 4)
#define LOG_DATA_SENT (1U << 5)

#define VERBOSE (LOG_UNSUPPORTED)
//#define LOG_OUTPUT_FUNC osd_printf_info
//#define VERBOSE (LOG_GENERAL | LOG_STATE | LOG_CONTROL | LOG_DATA)
//#define VERBOSE (LOG_UNSUPPORTED)

#include "logmacro.h"

Expand Down Expand Up @@ -80,16 +80,16 @@ void nscsi_bus_device::regen_ctrl(int refid)
data);
for(int i=0; i<devcnt; i++)
if(dev[i].ctrl) {
LOGMASKED(LOG_CONTROL, "%d=%s%s%s%s%s%s%s%s%s\n", i,
LOGMASKED(LOG_CONTROL, "dev%d=%s%s%s%s%s%s%s%s%s\n", i,
dev[i].ctrl & nscsi_device::S_RST ? "R" : "",
dev[i].ctrl & nscsi_device::S_ATN ? "A" : "",
dev[i].ctrl & nscsi_device::S_ACK ? "K" : "",
dev[i].ctrl & nscsi_device::S_REQ ? "Q" : "",
dev[i].ctrl & nscsi_device::S_SEL ? "S" : "",
dev[i].ctrl & nscsi_device::S_BSY ? "B" : "",
dev[i].ctrl & nscsi_device::S_MSG ? "M" : "",
dev[i].ctrl & nscsi_device::S_INP ? "I" : "",
dev[i].ctrl & nscsi_device::S_CTL ? "C" : "",
dev[i].ctrl & nscsi_device::S_SEL ? "S" : "",
dev[i].ctrl & nscsi_device::S_BSY ? "B" : "");
dev[i].ctrl & nscsi_device::S_INP ? "I" : "");
}
}

Expand Down
Loading
Loading