Skip to content

Latest commit

 

History

History
153 lines (129 loc) · 6.94 KB

0148-2023-09-28.md

File metadata and controls

153 lines (129 loc) · 6.94 KB

28 Sep 2023

Previous journal: Next journal:
0147-2023-09-27.md 0149-2023-09-30.md

Done

  • Create tt05 repo: https://github.com/algofoogle/tt05-raybox-zero
  • Put in key stuff: README, info.yaml, submodule, config.tcl, TOP bindings
  • Fixed Q change issue -- Stuff was out of whack when going from Q10.10 to Q11.11. Seems OK now, but Q10.10 is still the desired minimum I think, and not much point going above Q11.11.
  • Added in 'infinite' mode (VINF) and VSHIFT via SPI.
  • Fixed sim timing, i.e. to better match motion to sim speed.
  • Add sim options to control floor/ceiling stuff rather than just being always-on

Utilisation is currently ~50%.

tt05-raybox-zero repo

See 0126, but use the TinyTapeout/tt05-submission-template 'Use this template' option instead of forking.

  1. Clone the repo and add the submodule:

    git clone [email protected]:algofoogle/tt05-raybox-zero
    cd tt05-raybox-zero
    git submodule add [email protected]:algofoogle/raybox-zero src/raybox-zero
  2. Enable GitHub Pages

  3. Test that sim build works, and it runs OK:

    cd src/raybox-zero
    make csr  # To check that sim build works.

    Then in sim, remember:

    • P to rotate to portrait mode
    • R to reset
    • E to enable SPI

In future clone with git clone [email protected]:algofoogle/tt05-raybox-zero --recurse-submodules

Next steps

  • Tag pre-1.1 or something?
  • SPI tests - worthwhile for learning SPI commands/protocol.
    • TB SPI Flash ROM module - simple, or a known part sim?
    • Transfer Verilog module to FPGA and try it in hardware
    • SPI on an actual adapter board -- how to program it? Actually read it into BRAM during HBLANK and see if it keeps up at 25MHz (or even 50MHz).
  • Write code to read from texture ROM into RAM during HBLANK.
  • Optional dither in TOP
  • Decide difference between TT05 submission and EllenWood
  • Social media for TT04 and TT05!

tt05 improvements

  • OL2
  • Decide on map size
  • Make map overlay option work without having to duplicate it
  • TRACE_STATE_DEBUG option
  • Combine SPI interfaces, and see if there's a way to auto-detect vectors-vs-regs mode.
  • SPI immediate load option vs. deferred.
  • SPI byte-align stuff, even if just the whole command+payload.
  • Try running TOP module on FPGA
  • Check rcp sat bug and see if if affects the wall glitching
  • Try for different screen timing/resolution? Could do 320x200, 800x600, or 400x300 in 800x600?
  • Dither option in TOP, but avoid temporal (because it messes with some LCDs)
  • GL sim
  • Cocotb or other TB tests/modules/hardware
  • Make floor leak more granular
  • Document all the weird scaling and bit range choices

TT05 doco suggestions

  • README links to how to harden locally, optionally offering a VM
  • Provide a quick-check script and tips on YAML

VM Annoyances

Slow

  • Ubuntu 22.04.3 LTS guest VM running on my Win 11 Home laptop on 4K display is obviously slow.
  • Using VMSVGA, 128MB Video Memory, Enable 3D Acceleration (from memory it's even slower without).
  • Paravirtualization Interface: Default - Nested Paging enabled
  • 12 vCPUs. Maybe we need to give it fewer?
  • NO PAE/NX or Nested VT-x/AMD-V (option not available)
  • RAM: 16GB
  • PIIX3 chipset
  • I/O APIC is enabled. It hints that having this enabled could reduce performance
  • EFI is enabled
  • Audio DISABLED
  • Upgrade to Win 11 Pro?
  • KB input feels slow too, but not mouse
  • Per this I did this:
    • $ sudo apt install mesa-utils
      $ glxinfo | fgrep OpenGL
      OpenGL vendor string: VMware, Inc.
      OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
      OpenGL core profile version string: 4.1 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
      OpenGL core profile shading language version string: 4.10
      OpenGL core profile context flags: (none)
      OpenGL core profile profile mask: core profile
      OpenGL core profile extensions:
      OpenGL version string: 4.1 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
      OpenGL shading language version string: 4.10
      OpenGL context flags: (none)
      OpenGL profile mask: compatibility profile
      OpenGL extensions:
      OpenGL ES profile version string: OpenGL ES 3.0 Mesa 23.0.4-0ubuntu1~22.04.1
      OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
      OpenGL ES profile extensions:
      $ lsmod | grep vbox
      vboxsf                 98304  1
      vboxguest             495616  7 vboxsf
      
      NOTE: Fewer things than the other link shows; no drm_vram_helper, vboxvideo, drm_ttm_helper
  • On host, added C:\Program Files\Oracle\VirtualBox to user PATH.
  • Took a snapshot and forced VRAM to 256MB with:
    VBoxManage list vms
    VBoxManage modifyvm "ASIC-Ubuntu-2204" --vram 256
    NOTE: I couldn't disable I/O APIC because it's needed for multiple CPUs.
  • NOTE: Although I see this in the VBox.log:
    00:00:07.567158 VMSVGA: Single DX device mode: enabled
    00:00:08.983423 VMSVGA: Feature level 0xb100
    00:00:08.984029 VMSVGA: Adapter [NVIDIA GeForce RTX 4070 Laptop GPU]
    00:00:08.984047 VMSVGA3d: cap[0]=0x00000001 {3D}
    00:00:08.984055 VMSVGA3d: cap[1]=0x00000008 {MAX_LIGHTS}
    
    ...I will try forcing use of NVIDIA anyway in Windows, instead of integrated Intel graphics.
  • Update NVIDIA drivers (Studio) from 536.67 to 537.42 (2023-09-21):

    Although GeForce Game Ready Drivers and NVIDIA Studio Drivers can be installed on supported notebook GPUs, the original equipment manufacturer (OEM) provides certified drivers for your specific notebook on their website. NVIDIA recommends that you check with your notebook OEM for recommended software updates for your notebook.

    NVIDIA Studio Drivers provide artists, creators, and 3D developers the best performance and reliability when working with creative applications. To achieve the highest level of reliability, Studio Drivers undergo extensive testing against multi-app creator workflows and multiple revisions of the top creative applications from Adobe > to Autodesk and beyond.

    Applications

    The September NVIDIA Studio Driver provides optimal support for the latest new creative applications and updates. This includes DaVinci Resolve version 18.6 which features NVIDIA TensorRT acceleration as well as the latest Chaos Vantage update which introduces support for DLSS Ray Reconstruction.

Other

  • When launching VSCode, Ubuntu pops up with:
    Authentication required
    An application wants access to the keyring "Default keyring", but it is locked
    [ enter password ]