In the previous part I explained how I compared my own emulator to a reference emulator using diff. This was done as a debugging technique to find out what’s wrong with my implementation of specific instructions. In this post I’ll show how I deal with very long running tests that creates too much log data to diff in an ordinary way. By too much log data I’m talking about tens, hundreds or even…
I’ve been creating emulators for while now, and something that’s always a bit difficult is verifying that they work as they should. Is ADC setting the carry flag correctly? Is POP incrementing SP as it should?
I have previously experimented with creating Wireshark dissectors in Lua. The dissector I made back then was for a network protocol. Wireshark can also sniff USB traffic, so I thought it would be interesting to take a look at that too.
Here I introduce a method that can be used to generate random numbers drawn from a normal distribution. The code below uses the Box-Muller transform to make sure the numbers are normally distributed. function boxMullerTransform() { const u1 = Math.random(); const u2 = Math.random(); const z0 = Math.sqrt(-2.0 * Math.log(u1)) * Math.cos(2.0 * Math.PI * u2); const z1 = Math.sqrt(-2.0 * Math.log(u1))…
Fiddler is an application that is used to view, record and manipulate HTTP requests. Fiddler has an extension system that makes it possible to make changes to the UI, create custom inspectors, modify requests and responses, and so on. Extensions can be made in either .NET or in a programming language called FiddlerScript. FiddlerScript is Fiddler’s version of JScript.NET, which is an old .NET…
There are times when you want to view the raw HTTP requests that are being sent from a client to a server. This can, for example, be when you are developing an application that sends or receives HTTP requests or are using a third-party tool to test HTTP-based APIs. When you’re writing code that sends HTTP requests you can usually only guess what the actual raw HTTP request will look like. When…
Here’s a short SQL script I made that can be used to print all the arguments passed to a given stored procedure. It’s for SQL Server and will not work with other RMDBS. It can be used, for example, for debugging business logic that is represented as stored procedures. By print I mean the print statement that exists in Transact-SQL.