Skip to content

QNICE writes to manually-loadable ROMs on hard reset. #56

@Rhialto

Description

@Rhialto

Copied from discord https://discord.com/channels/719326990221574164/782759365064917065/1315000073444135034

The QNICE core, when starting up, seems to write to several of the "core specific devices" as listed in C_CRTROMS_MAN. I caught it doing that and enabling qnice_dev_we_i for several of them. The disk drive does a checksum of its ROMs and then fails. It shows that by doing 2 flashes of its drive led, repeatedly.
I though to maybe avoid it by changing the number of the drive ROM, but this made no difference. Now the changed number appears, and write is done to addrexx $3000 in its address space....
I had to disable writing to the drive ROM for now until I find out what's going on exactly.

Screenshot_2024-12-07_19-06-17

I found out where it happens. I suppose the QNICE code doesn't change often so my addresses are probably reproducable. It is at 24A1 in a function called CRTROM_CSR_W. It is called from 237D just below the label _CRTRI_L9 and the comment ; set all CSRs of all CRT/ROM devices to "idle".

008328                                                
008329                                                ; set all CSRs of all CRT/ROM devices to "idle"
008330  2373  0F80  81D4                              MOVE CRTROM_MAN_NUM, R0
008331  2375  0040                                    MOVE @R0, R0
008332  2376  0F84  81D8                              MOVE CRTROM_MAN_DEV, R1
008333  2378  0FA4  7000                              MOVE CRTROM_CSR_STATUS, R9
008334  237A  0FA8  0000                              MOVE CRTROM_CSR_ST_IDLE, R10
008335  237C  01A0        _CRTRI_L9                   MOVE @R1++, R8
008336  237D  FFB0  011A                              RSUB CRTROM_CSR_W, 1
008337  237F  3F80  0001                              SUB 1, R0
008338  2381  FFAB  FFF9                              RBRA _CRTRI_L9, !Z
...
008599                    ; Write to the control and status register of a CRT/ROM device
008600                    ; Input:                    
008601                    ; R8: device id             
008602                    ; R9: CSR register          
008603                    ; R10: value                
008604                    ; Output: none, all registers remain unchanged
008605  2499  E0C0        CRTROM_CSR_W                INCRB
008606                                                
008607  249A  0F80  FFF4                              MOVE M2M$RAMROM_DEV, R0
008608  249C  0801                                    MOVE R8, @R0
008609  249D  0F80  FFF5                              MOVE M2M$RAMROM_4KWIN, R0
008610  249F  0F81  FFFF                              MOVE CRTROM_CSR_4KWIN, @R0
008611  24A1  0A25                                    MOVE R10, @R9
008612                  
008613  24A2  E100                                    DECRB
008614  24A3  0DBC                                    MOVE @R13++, R15

Metadata

Metadata

Assignees

Labels

questionFurther information is requestedresearch

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions