11 March 2016 - Forum Rules
Started by Disch, July 13, 2015, 12:50:41 AM
Quote from: DaMarsMan on July 16, 2015, 12:20:40 PMBass also did not have the features you needed?
Quote from: Nightcrawler on July 16, 2015, 05:58:36 PMI suggest you also take a look at Asar. It's a fixed and extended version of the old xkas lineage. It's not well known in these circles, so I thought I'd throw it out there.
Quote from: I.S.T. on July 16, 2015, 07:39:31 PMSilly question: What made you choose that name?
Quote from: Disch on July 16, 2015, 09:51:13 PMAsar is interesting, but it still doesn't have the mirroring acknowledgement or the awareness to shrink to directpage when appropriate which are two things I REALLY wanted. It does have some other interesting ideas that I might steal, though
Quote from: Nightcrawler on July 18, 2015, 09:35:45 AMHow do you intend to do any better than the aforementioned assemblers on direct page awareness? You will always have the inherent problems that you don't know the starting values (unless explicitly given by the user),
Quoteyou can't handle it being changed by stack pulls, or if the value is a result of a calculation, table grab, etc.
QuoteFor mirroring, have you accounted for the fact that WRAM is not mirrored in all banks?
Quote from: Disch on July 18, 2015, 09:46:00 AMIt's explicitly given by the user.I don't need much for DP awareness. Just a way to specifiy what direct page is and have the assembler take advantage of it. Many assemblers don't even do that much -- if you want to use DP you have to actually specify the size of each individual instruction. Like in xkas, you have to use the '.b' mnemonic suffix (lda.b) or it will always use absolute mode. I didn't see anything in Asar's notes which changed that -- though maybe I missed it.
QuoteYes. You specify a range of banks for data to be mirrored across.
Quote from: Nightcrawler on July 20, 2015, 08:09:11 PM1. Does #IncBin and #IncSrc handle relative paths?
Quote2. When declaring variables like 'SomeVar = $001800', are you required to always use long addresses?
Quote3. Is there a way to output the pc or embed it into debug message like #Warn/#Error? I have to do this often to get the breakpoint I need to use to debug various specific areas and lines of code. I didn't see a way to do this.
Quote4. Can expressions be used in variable declarations? Something like...
QuoteSuggestions:I know you probably choose #Byte,#Word,#Long,#Dword for consistency with all directives and ease of parsing, but what do think about also supporting traditional db (define byte), dw (define word), etc. type syntax many assemblers do?
QuoteComments:1. #Var is a nice addition.
Quote2. Interesting approach to #Org with the independence between platform address and file offset. That's great for more difficult mappings as long as it is not a burden for simple mappings.
fileHeaderSize = 0 ; or $200; hirom org#macro org, pc #org pc, (pc & 0x3FFFFF) + fileHeaderSize#endmacro!org $C00000 ; blah
Quote3. It's dangerous to make assumptions that some things will never be used.
QuoteSmall mistakes observed:
sGameData .struct lives .byte ? flowers .byte ? score .byte ?,?,?,?,?,? high .byte ?,?,?,?,?,? currLevel .byte ? exitOpen .byte ?.ends
*=7e2000GameData .dstruct sGameDataorGameData .dstruct sGameData = 0x7e2000
kVectors .block charBase = $4000 spr0ID = charBase+1016 spr1ID = charBase+1017 spr2ID = charBase+1018 spr3ID = charBase+1019 spr4ID = charBase+1020 spr5ID = charBase+1021 spr6ID = charBase+1022 spr7ID = charBase+1023 .bend
.for ue = kVectors.charBase, ue < kVectors.charBase + $400, ue = ue + 40.byte >ue.next
QuoteI can see the current system lets you do :: in place of . but I doesn't look like you can instance a namespace, or am I wrong?
.for range = 0, range < 256, range = range + 1.byte 128.5 + 127 * sin(range * rad(360.0/256)).next
.for range = 0, range < $27, range = range + 1stz 2100+range.next..handle unique cases here
nop .rept 3 ; wait for mul result
numBanks = 16 ; must be POW2bankShift = 4bankSize = $400RAMCache = $7F0000; a = slot , x = channeldmaSlotOnChannel asl a .rept bankShift ; shift bits up ready for channel maskphxora 1,splxasl a ; convert to wordstaxjmp (_DMALUT),x_DMALUT.for pointer = DMAstart, pointer < DMAend, pointer = pointer + DMASize.word pointer.nextDMAstart = *.for src = RAMCache , src < RAMCache + ( numBanks * bankSize), src += bankSize.for dmaC = 4, dmaC < 8, dmaC = dmaC + 1init DMA channel dmaCset DMA src dmaC= srcset VRAM dest dmaC = src - $7F0000fire DMAClda #$80sta $2115phprep #$20lda #<>srcsta $2116sta $4302+(dmaC*$10)lda #bankSizesta $4305+(dmaC*$10)sep #$20lda #`srcsta $4304+(dmaC*$10)lda $420Bora #1 << (src - RAMCache ) / bankSizesta $420Bplprtl.nextDMAend = *DMASize = (* - start) / numBanks
Quote from: oziphantom on July 22, 2015, 04:24:19 AMFixed Point : nah, you treat it all as floating point internally in the assembler and then drop to fixed at the end. Thus 3.14 + 5 = 8.14, ints are just fixed point 8:0 or 16:0 or 24:0 The assembler is only ever working on constant expressions, not doing the actual maths the 65816 will be doing.
QuoteRept, For..Next :
QuoteWhat do you edit your code in, does something like sublime text give you auto complete?
Quote from: Disch on July 22, 2015, 12:22:12 PMI use Notepad++ which allows you to set up syntax highlighting -- but it doesn't have auto complete.
phaphxphyjsr <pointer from table>plyplxplarti
Quote from: oziphantom on July 23, 2015, 03:05:26 AMAhh yes, bit shifts. That is going to force the need to determine if the whole expression is int or float and change accordingly.
QuoteNot unrolled loops, the DMA example is not a loop unroll,
Page created in 0.111 seconds with 20 queries.