vc64web/virtualc64web

DMA Visualizer

Opened this issue ยท 11 comments

grafik

I did this c64->configure(OPT_DMA_DEBUG, true);

but the visualization is fairly static ... it does not change ... am I holding it wrong ?

grafik

oh the paparazzi took a photo of us ๐Ÿ™„ ... me left ... dirk on the right side... ๐Ÿค“

The C64 has pretty stable "DMA" compared to the Amiga (VICII accesses are more or less static).

If you look at the image closely, you can see that every item casts a shadow (red arrow). The shadow is due to the fact that the DMA debugger automatically modifies the brightness of the debug color according to the bus value. As long as these shadows go away when the screen changes back to the checkerboard, everything is fine.

101246825-e6be3c80-3715-11eb-89b6-28ff7f8c3ede

Yes, paparazzi are really behind us. But are you sure that's us? We look so young on this picture... ๐Ÿค” Here is a most recent one I think: ๐Ÿค“

theatre

grafik

and what does the shadow mean ? does it mean that it is a sprite ?

The shadows reflect bitmap graphics data (or data from the character Rom, depending on the display mode). Sprite data is fetched outside the visible screen area. To make it visible, you need to display the whole texture (the one with the checkerboard pattern).

I want to have the sprite cutout feature ... it will be very useful for identifying in game sprites by number and this is particulary very important for ActionButton autobot AI programming ...

I am doing this now ...
c64->configure(OPT_CUT_LAYERS, SPR0|SPR1|SPR2|SPR3|SPR4|SPR5|SPR6|SPR7 /*c64->getConfigItem(OPT_CUT_LAYERS) */);

but no effect ...๐Ÿ˜ณ

the hide sprite feature works ... but I don't need it ...๐Ÿ™„
c64->configure(OPT_HIDE_SPRITES, true);

Oh no again ... one just can't drink a coffee without being photographed ๐Ÿ™„

grafik

I am doing this now ... c64->configure(OPT_CUT_LAYERS, SPR0|SPR1|SPR2|SPR3|SPR4|SPR5|SPR6|SPR7)

There is a global bit (0x100) for enabling and disabling sprite layer cutting. If this bit is 0, the lower eight bits (sprite bits) have no effect. Hence, what you need to do is:

c64->configure(OPT_CUT_LAYERS, 0x100|SPR0|SPR1|SPR2|SPR3|SPR4|SPR5|SPR6|SPR7)

This will cut out all 8 sprites.

grafik

Yes the mysterious 0x100 bit was missing ...

now I have to add the config section ... should it be a global or a game specific setting ๐Ÿค” ... I think we go with a gobal one...

Very cool ๐Ÿ˜Ž.

I think we go with a gobal one...

Agreed. Make it a global one

grafik

fantastic ... this is brilliant ... you see the sprites changing live while you are clicking ..

Agreed. Make it a global one

I make it not only global but I also implemented a new setting feature ... I implemented it as a 'forgettable' setting ... thus when you restart the browser now actively forgets about what the user set in the last session ... all layer cut outs will be reset to zero ...

here is the javascript code ...


$('.layer').change( function(event) {
    //recompute stencil cut out layer value
    const layers={
        sprite0: 0x01,
        sprite1: 0x02,
        sprite2: 0x04,
        sprite3: 0x08,
        sprite4: 0x10,
        sprite5: 0x20,
        sprite6: 0x40,
        sprite7: 0x80,        
    };
    const GLOBAL_SPRITE_BIT= 0x100;

    var layer_value = 0;
    for(var layer_id in layers)
    {
        if(document.getElementById(layer_id).checked)
        {
            layer_value |= layers[layer_id];
        }
    }
    if((layer_value & 0xff) != 0)
    {
        layer_value |= GLOBAL_SPRITE_BIT;
    }

    wasm_cut_layers( layer_value );
});

I think we close this ... if somebody votes against not implementing the DMA visualizer .... we can open this again

if somebody votes against not implementing the DMA visualizer

No DMA visualizer in the web edition? ๐Ÿ˜ฑ

Oh in that case we add it to vc64web. ๐Ÿ˜… we need it for vAmigaWeb anyways ... so the code could be reused...