kierenj / 0x10c-DevKit

0x10c DevKit
http://0x10c-devkit.com/
39 stars 4 forks source link

Disk does not raise interrupt when inserted. #193

Closed phiCatcher closed 12 years ago

phiCatcher commented 12 years ago

When the HMD2043 is set to MEDIA_STATUS_INTERRUPT mode, and IA and SET_INTERRUPT_MESSAGE are configured correctly, the interrupts fail to trigger when a disk is inserted during runtime.

I'm assuming that the software only checks for the status of disks when the code is compiled.

kierenj commented 12 years ago

It raised an interrupt in my tests; perhaps you could send along your solution w codr and Ill take a deeper look?

Sent from Samsung Galaxy Note

-------- Original message -------- Subject: [0x10c-DevKit] Disk does not raise interrupt when inserted. (#193) From: phiCatcher reply@reply.github.com To: Kieren Johnstone kierenj@gmail.com CC:

When the HMD2043 is set to MEDIA_STATUS_INTERRUPT mode, and IA and SET_INTERRUPT_MESSAGE are configured correctly, the interrupts fail to trigger when a disk is inserted during runtime.

I'm assuming that the software only checks for the status of disks when the code is compiled.


Reply to this email directly or view it on GitHub: https://github.com/kierenj/0x10c-DevKit/issues/193

phiCatcher commented 12 years ago

Ok, my bad, must be something obscure I've overlooked in my code :) I'll try rewriting it in a few. My code is in a mess atm so don't worry about taking a deeper look, thanks

phiCatcher commented 12 years ago

Update: Still cannot get the running code to trigger interrupts when media changes. I've been using the code below to test for the interrupt.

;This code assumes that the HMD2043 is at pos 3

:hw_load_disk
ias on_change_status

;changing the interrupt message
set a,5
set b,0xF0F0
hwi 3

;change device flags to MEDIA_STATUS_INTERRUPT
set a,3
set b,1
hwi 3

;check to see if it really has changed
set b,0xffff
set a,2
hwi 3

set pc,endless_loop

:on_change_status
set z,0xABCD
rfi a

:endless_loop
set x,1
set pc, endless_loop    ;When code gets to here, eject the disk. on_change_status should run

At this point I'm not sure if it's a problem with my code or a genuine bug

kierenj commented 12 years ago

MEDIA_STATUS_INTERRUPT is 2, not 1 as you use here:

;change device flags to MEDIA_STATUS_INTERRUPT set a,3 set b,1 hwi 3

It's bit 1 (resulting in 2), as opposed to bit 0 (resulting in 1) :)

I'll close this, let me know if you still don't have any luck