@@ -194,15 +194,15 @@ st11m_device::st11m_device(const machine_config &mconfig, const char *tag, devic
194
194
195
195
void xt_hdc_device::device_start ()
196
196
{
197
- m_buffer = std::make_unique<uint8_t []>(256 * 512 ); // maximum possible transfer
197
+ m_buffer = std::make_unique<uint8_t []>(256 * 512 ); // maximum possible transfer
198
198
m_timer = timer_alloc (FUNC (xt_hdc_device::process_command), this );
199
199
}
200
200
201
201
void xt_hdc_device::device_reset ()
202
202
{
203
203
m_drv = 0 ;
204
204
m_data_cnt = 0 ;
205
- m_buffer_ptr = nullptr ;
205
+ m_buffer_ptr = &m_buffer[ 0 ] ;
206
206
m_hdc_control = 0 ;
207
207
for (int i = 0 ; i < 2 ; i++)
208
208
{
@@ -221,7 +221,7 @@ void xt_hdc_device::device_reset()
221
221
}
222
222
223
223
m_csb = 0 ;
224
- m_status = 0 ;
224
+ m_status = STA_COMMAND | STA_READY ;
225
225
m_error = 0 ;
226
226
}
227
227
@@ -310,7 +310,7 @@ int xt_hdc_device::get_lbasector()
310
310
* implementation that threw the idea of "emulating the hardware" to the wind
311
311
*/
312
312
313
- int xt_hdc_device::dack_r ()
313
+ uint8_t xt_hdc_device::dack_r ()
314
314
{
315
315
harddisk_image_device *file = pc_hdc_file (m_drv);
316
316
if (!file)
@@ -354,7 +354,7 @@ int xt_hdc_device::dack_r()
354
354
return result;
355
355
}
356
356
357
- int xt_hdc_device::dack_rs ()
357
+ uint8_t xt_hdc_device::dack_rs ()
358
358
{
359
359
logerror (" %s dack_rs(%d %d)\n " , machine ().describe_context (), m_hdcdma_read, m_hdcdma_size);
360
360
@@ -383,7 +383,7 @@ int xt_hdc_device::dack_rs()
383
383
384
384
385
385
386
- void xt_hdc_device::dack_w (int data)
386
+ void xt_hdc_device::dack_w (uint8_t data)
387
387
{
388
388
harddisk_image_device *file = pc_hdc_file (m_drv);
389
389
if (!file)
@@ -423,7 +423,7 @@ void xt_hdc_device::dack_w(int data)
423
423
424
424
425
425
426
- void xt_hdc_device::dack_ws (int data)
426
+ void xt_hdc_device::dack_ws (uint8_t data)
427
427
{
428
428
*(m_hdcdma_dst++) = data;
429
429
@@ -829,6 +829,7 @@ void xt_hdc_device::select_w(uint8_t data)
829
829
{
830
830
m_status &= ~STA_INTERRUPT;
831
831
m_status |= STA_SELECT;
832
+ m_status |= STA_READY;
832
833
}
833
834
834
835
0 commit comments