"viciv.vhdl" studies

Much of the impetus behind my studying of “viciv.vhdl” came from an issue I observed while using 640x400 4-bitplanes (16 colour) mode.

The discord thread itself is probably a good read in relation to these studies, so will provide a link to it also:

State Machines

There are two main state machines residing within viciv.vhdl, they are:

  • raster_fetch_state

    • The larger of the two

    • Encompasses all the various drawing modes, such as:

      • character modes (multi-colour, monochrome, extended colour)

      • bitmap modes (monochrome, multi-colour)

      • sprites (0 to 7)

      • bitplane mode

        • note that the 8 bitplanes make use of the same sprite mechanics and are internally considered to be sprites 8 to 15

  • paint_fsm_state

    • The smaller of the two

    • Starts off sitting in ‘Idle’ state, until some activity within the raster_fetch_state machine pushes it to a different paint-state.

 

I’ll provide graphviz/dot diagrams for the two state machines below. My hope is that they will be of good use to newcomers to this file that want an overview of the behaviour (rather than trying to have a read through the over 5000 lines of source code within the “viciv.vhdl” file). Once you get your bearings via a nice overview diagram like this, I hope you’ll be able to navigate to the areas you are interested in easier and hone your focus on the specific areas you want to investigate deeper into.

“raster_fetch_state” state machine

 

“paint_fsm_state” state machine