Z80: having _wait() before _mwrite(addr, data) looks incorrect.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- embedded-iot, game-dev
Direzione di ricerca
Start with the linked codegen/z80_gen.py location and trace how generated Z80 memory-write and I/O-write cycles handle _wait() and bus signals. Check the related emulator code and tests for wait-state behavior; done means the address is visible before wait handling and the write data is presented at the correct cycle, including the reported MZ-700 cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This line looks incorrect for me.
Let me take an example. SHARP MZ-700 has an LSI which handles PAL/NTSC video circuit and also decodes address bus for dispatching between DRAM, ROM, peripherals and VRAM. If CPU is accessing the video RAM ($D000-$DFFF) and there is no horizontal blank currently then /WAIT is set to 0 to pause the CPU and avoid a VRAM access conflict. So, that /WAIT is set to 0 because LSI decodes a VRAM address present on the address bus (so a set_ab_x(addr, Z80_MREQ|Z80_WR) ; should be done before a call to _wait()).
That means, the emulated LSI chip would need to check first that address setting to set Z80_WAIT upon the first tick of MWR T1 and retrieves the data on the next tick (MWR T2) just after passing the _wait() call. So just setting Z80_MREQ|Z80_WR at the second tick is wrong and should be done in two parts: first setting the address bus with Z80_MREQ|Z80_WR|Z80_AS (so the system can set the Z80_WAIT if needed) then Z80_MREQ|Z80_WR|Z80_DS (so CPU can retrieve the final data given by the system when clears Z80_WAIT)
elif mcycle.type == 'mwrite':
l(f'// -- mwrite')
addr = mcycle.items['ab']
data = mcycle.items['db']
add(f'_set_ab_x({addr},Z80_MREQ|Z80_WR|Z80_AS)')
add(f'_wait();_set_db_x({data},Z80_MREQ|Z80_WR|Z80_DS);{action}')
add('')
Maybe there is a better solution than having Z80_AS and Z80_DS but I'm pretty sure Z80_WAIT is not well handled currently.
Same issue with Z80_IORQ|Z80_WR. :)
Still with SHARP MZ-700, the access to Monitor ROM ($0000-$0FFF) wants a one-wait state, so you also have the same issue here as well.
- Lingua principale
- C
- Stelle
- 1.3k
- Fork
- 101
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di floooh/chips
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
-
m6502 RESET not handled on RDY and on JAMForse di nuovo libera @floooh l’ha presa 159 giorni fa e non c’è nessuna pull request aperta. Aperta
-
KC87 tape loading tone should be silent on internal speakerForse di nuovo libera @floooh l’ha presa 169 giorni fa e non c’è nessuna pull request aperta. Aperta
floooh/chips#116 · 1 commento · 1 reazione · 1 assegnatario ·
-
C64 CIA claude investigationForse di nuovo libera @floooh l’ha presa 225 giorni fa e non c’è nessuna pull request aperta. Aperta
Tutte le issue di floooh/chips
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenPrinting/cups#1833 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
libsndfile/libsndfile#1238 ·