Skip to content

Feature request: ability to load pal into LUT and set Bitmap LUTs natively in SB #96

@programmervsworld

Description

@programmervsworld

This is a stretch, and I know this one is probably wasting valuable kilobytes, but its really odd to have the ability to bload a palette in, then not have it work until the developer pokes the values back in from one memory area to another. I find myself doing it so much in games that I have a proc for it:

proc loadpal(addr,lutno)
    lutaddr=$D000+(lutno*$400)
    poke 1,1
    for x=0 to 1023:?(lutaddr+x)=?(addr+x):next
endproc

Later in the process I have to do this to set the LUT on a bitmap:

proc bitmaplut(bitmapno,lutno)
    if bitmapno>=0&bitmapno<3&lutno>=0&lutno<4
        add$="53504,53512,53520"
        value=val(itemget$(add$,bitmapno+1,","))
        current=?(value)
        poke value,(1|1<<lutno)
    endif 
endproc

I sort of understand the issue though with the $D000 space, but it seems like bload'ing to already precious space in SB then having to waste basic cycles to put it the correct $D000 register is an added complication that most folks learning SB won't get out of the gate.

Notes: Seems like we should have a command to do that for sure, however I don't know which costs less in terms of space. Having it IN SuperBasic or cut/copy/pasting those procs in for every game that needs it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions