Handmade Network»bitwitch

Recent Activity

I slapped together a horrendous websocket server and now have basic networking functioning! A user on a different machine can drag their avatar and their position will be broadcasted to all other connected users! &discord-proxchat

I figured out a better method for hooking into volume changes, so now we can change multiple users volumes simultaneously. &discord-proxchat

Loading in avatar images and selecting the correct user's volume to change. &discord-proxchat

Ben posted this idea in the jam channel and I'm giving it a shot. So far I got some very primitive volume control of a user in a Discord voice channel from a browser extension, by way of disgusting hacks. &discord-proxchat

I did a lot of work today on the memory viewer.
I implemented scrolling the viewer with mouse wheel, as well as a "goto address" command window that lets you jump to any address.
The first video shows the navigation features and the second video demonstrates load and store instructions moving data to and from memory.

Day 2

My tasks for today were:

  • get the disassembler working
  • implement simple text rendering of ttf fonts
  • start the memory viewer window

i got the very beginnings of a memory viewer working. its kind of cool to watch data fly around in memory with a game running.

i got my disassembler working and you can step through instructions.
the current instruction that the program counter is pointing to is highlighted.
you can also step by frame.

Day 1

I had to work today so I only got a few hours of jammin in. I was mainly focused on trying to figure out how to write a disassembler. I want to be able to display a games' assembly and let the user step through it as the game runs. I also want to be able to display a certain number of instructions before the current instruction that the cpu's program counter is pointing to. The 6502 has variable length instructions so this is not straight forward to seek backwards from the current program counter to determine previous instructions.

I also cannot disassemble the whole memory up front, because there are chips called "mappers" inside NES cartridges that dynamically remap addresses. The part of the address space visible by the cpu that is occupied by cartridge memory can be remapped by the mapper to any arbitrary memory within the cartridge.

I think a viable approach will be to just cache a certain number of instruction addresses. The program counter can be cached before each instruction that the cpu executes, replacing the oldest address in cache. This should make it possible to disassemble code from a few instructions prior to a few instructions following the current instruction.

I had to do some refactoring work just to get the code into a place where this is possible. It has been awhile since I touched this codebase as well. I wasn't able to get it working tonight, so I will go at it again tomorrow.

A few days leading up to the jam I did some prep work. I created a second window where all the visibility stuff will go, and displayed pattern table memory in it. I posted some screenshots of pattern tables for various games in #project-showcase.

I am playing around with my NES emulator for the Visibility Jam (&bitwitch-nes).
Here are some examples of pattern table memory dumped from some NES cartridges and visualized.
Tomorrow I hope to get a disassembler working, so you can step through code as a game is running.


infinitely less cool than bvisness's project in dreams, but for this year's advent of code i'm playing around with creating visualizations of the solutions. i just write frames directly to a gif file, and then use gifsicle to optimize it. i found a cool single header c lib for easily writing gifs, https://github.com/charlietangora/gif-h. its been pretty fun.
(day 5 supply stacks and day 8 treetop tree house below)

Forum reply: Emacs like config