|
36 | 36 | ; and Casio PV-2000. |
37 | 37 | ; Revision date: Aug/30/2024. Changed mode bit to bit 3 (avoids collision |
38 | 38 | ; with flicker flag). |
| 39 | + ; Revision date: Oct/15/2024. Added LDIRMV. Solved bug where asterisk and number |
| 40 | + ; keys values were inverted. |
39 | 41 | ; |
40 | 42 |
|
41 | 43 | JOYSEL: equ $c0 |
@@ -286,6 +288,21 @@ FILVRM: |
286 | 288 | ; 37 42 |
287 | 289 | ret |
288 | 290 |
|
| 291 | +LDIRMV: |
| 292 | + ex de,hl |
| 293 | + call SETRD |
| 294 | + ex (sp),hl |
| 295 | + ex (sp),hl |
| 296 | +.1: |
| 297 | + ld a,(VDP) |
| 298 | + ld (de),a |
| 299 | + inc de |
| 300 | + dec bc |
| 301 | + ld a,b |
| 302 | + or c |
| 303 | + jp nz,.1 |
| 304 | + ret |
| 305 | + |
289 | 306 | LDIRVM: |
290 | 307 | EX DE,HL |
291 | 308 | CALL SETWRT |
@@ -366,29 +383,51 @@ FILVRM: |
366 | 383 | ; 35 40 |
367 | 384 | ret |
368 | 385 |
|
| 386 | +LDIRMV: |
| 387 | + ex de,hl |
| 388 | + call SETRD |
| 389 | + ex (sp),hl |
| 390 | + ex (sp),hl |
| 391 | +.1: |
| 392 | + in a,(VDP) |
| 393 | + ld (de),a |
| 394 | + if SORD |
| 395 | + nop |
| 396 | + endif |
| 397 | + if SG1000+MEMOTECH+EINSTEIN |
| 398 | + nop ; SG1000 is 3.58 mhz, but SC3000 is 4 mhz. |
| 399 | + nop |
| 400 | + endif |
| 401 | + inc de |
| 402 | + dec bc |
| 403 | + ld a,b |
| 404 | + or c |
| 405 | + jp nz,.1 |
| 406 | + ret |
| 407 | + |
369 | 408 | LDIRVM: |
370 | | - EX DE,HL |
371 | | - CALL SETWRT |
372 | | - EX DE,HL |
373 | | - DEC BC |
374 | | - INC C |
375 | | - LD A,B |
376 | | - LD B,C |
377 | | - INC A |
378 | | - LD C,VDP |
| 409 | + ex de,hl |
| 410 | + call SETWRT |
| 411 | + ex de,hl |
| 412 | + dec bc |
| 413 | + inc c |
| 414 | + ld a,b |
| 415 | + ld b,c |
| 416 | + inc a |
| 417 | + ld c,VDP |
379 | 418 | .1: |
380 | 419 | if SORD |
381 | | - NOP |
| 420 | + nop |
382 | 421 | endif |
383 | 422 | if SG1000+MEMOTECH+EINSTEIN |
384 | | - NOP ; SG1000 is 3.58 mhz, but SC3000 is 4 mhz. |
385 | | - NOP |
| 423 | + nop ; SG1000 is 3.58 mhz, but SC3000 is 4 mhz. |
| 424 | + nop |
386 | 425 | endif |
387 | | - OUTI |
388 | | - JP NZ,.1 |
389 | | - DEC A |
390 | | - JP NZ,.1 |
391 | | - RET |
| 426 | + outi |
| 427 | + jp nz,.1 |
| 428 | + dec a |
| 429 | + jp nz,.1 |
| 430 | + ret |
392 | 431 | endif |
393 | 432 |
|
394 | 433 | LDIRVM3: |
@@ -478,8 +517,8 @@ nmi_on: |
478 | 517 |
|
479 | 518 | if COLECO |
480 | 519 | keypad_table: |
481 | | - db $0f,$08,$04,$05,$0c,$07,$0a,$02 |
482 | | - db $0d,$0b,$00,$09,$03,$01,$06,$0f |
| 520 | + db $0f,$08,$04,$05,$0c,$07,$0b,$02 |
| 521 | + db $0d,$0a,$00,$09,$03,$01,$06,$0f |
483 | 522 | endif |
484 | 523 |
|
485 | 524 | cls: |
|
0 commit comments