Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YAZ180 - Am9511A banked device driver
- Loading branch information
Showing
15 changed files
with
353 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
libsrc/_DEVELOPMENT/target/yaz180/device/am9511a/am9511a_command.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
;------------------------------------------------------------------------------ | ||
; APU_CMD | ||
; | ||
; C = APU COMMAND | ||
|
||
INCLUDE "config_private.inc" | ||
|
||
SECTION code_driver | ||
|
||
PUBLIC asm_am9511a_cmd | ||
|
||
EXTERN APUCMDInPtr, APUPTRInPtr | ||
EXTERN APUCMDBufUsed, APUPTRBufUsed | ||
|
||
|
||
asm_am9511a_cmd: | ||
ld a,(APUCMDBufUsed) ; Get the number of bytes in the COMMAND buffer | ||
cp __APU_CMD_SIZE-1 ; check whether there is space in the buffer | ||
ret NC ; COMMAND buffer full, so exit | ||
|
||
ld hl,APUCMDBufUsed | ||
di | ||
inc (hl) ; atomic increment of COMMAND count | ||
ld hl,(APUCMDInPtr) ; get the pointer to where we poke | ||
ei | ||
ld (hl),c ; write the COMMAND byte to the APUCMDInPtr | ||
|
||
inc l ; move the COMMAND pointer low byte along, 0xFF rollover | ||
ld (APUCMDInPtr),hl ; write where the next byte should be poked | ||
ret | ||
|
Oops, something went wrong.