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
; (c) Copyright 2016 Matt Waltz | |
;------------------------------------------------------------------------- | |
; Faster memset variation | |
; Reasons faster: | |
; 1) uses ldir to memset | |
; 2) executes in RAM to avoid flash wait states | |
;------------------------------------------------------------------------- | |
.def _memset_fast | |
.assume adl=1 |
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
; Response to https://gist.github.com/nitro2k01/e45e47f8469009b8a43ad5e48d951442, | |
; which is nitro2k01's response to RGME about Pokemon Yellow sample playback. | |
; For this to make any sense, you'll definitely want to watch the video and | |
; then read nitro2k01's response. | |
; With the restriction that the sound data must end at the end of a page (which | |
; seems fine, you're probably not fitting multiple of these onto a page), 24 | |
; cycles per sample is achievable: | |
; hl = data |
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
assume adl=1 | |
section .text | |
public _roundf | |
_roundf: | |
; exponent_biased >= 0 && exponent_biased < 256 | |
; && exponent_biased = exponent + 127 | |
; = exponent + 127 >= 0 && exponent + 127 < 256 | |
; = exponent >= -127 && exponent < 129 |