MEGA65 / mega65-libc

Simple C library for the MEGA65
Other
25 stars 20 forks source link

Unify memory operations #22

Closed mlund closed 1 year ago

mlund commented 1 year ago

The commit 87ae766 introduced new peek/poke functions in cc65. Ideally these should be available also in KickC and Clang. Related to #18. Ping @ki-bo.

mlund commented 1 year ago

Are lpeek and dma_peek the same operation implemented in assembler and C, respectively on cc65? Ping @ki-bo

ki-bo commented 1 year ago

@mlund They have the same effect, but dma_poke uses a DMA transfer to write a single byte. This is inefficient. The new lpoke uses 32 bit write operations to do the same in an efficient way.