Saturday, November 24, 2018

Sef-plagiarism?


One of the courses that we are required to take for the Masters of Science in Computer Science program that I am undertaking is called Seminar. It is a single credit course that needs to be taken three times. Each time the student, with the supervision of his instructor, picks a research paper which the student then researches, attempting to confirm or explore the results of the paper, and then presents the paper to the class. In addition to the presentation is a written report on the subject outlining what they have learned from the paper. As anybody reading this blog already knows, I am developing an Atari 2600 emulator. The sound emulation, to do properly, requires something called a Looped-Feedback Shift Register (LFSR) which is similar to a poly-counter which is one of the earliest ways of generating pseudo-random numbers. This had me looking into random number generation in general. One of the papers I was very impressed with is “PCG: A Family of Simple Fast Space-Efficient Statistically Good Algorithms for Random Number Generation.” The link to this paper is http://www.pcg-random.org/paper.html and while it is a very lengthy paper, it is not too technical and goes over a lot of details about random number generation in general in addition to presenting a new family of random number generators.

I am planning on going over this paper in three separate articles. First, a look at what a random number is and what makes a good random number generator. Next, how the generators are tested as well as a less-robust testing method that would work for the type of things I need to do. Finally, we will look at the PCG algorithm.

I am going to start this series of articles in four weeks with next fortnight being a week “off” though I may post something if I have the time. The reason for the delay is something known as self-plagiarism. To me this is a really strange concept to me, but some Universities will actually consider using your own material in a paper to be a form of plagiarism. To get around this possibility I am going to wait until my report has been submitted and  use that report as the reference to the blog so it is important that the report be submitted before I start posting the blog. This is probably me being way over-paranoid but it is better to be safe than sorry.

In the meantime, I urge you to get a copy of the paper and read it. See you in a fortnight or two.

Saturday, November 10, 2018

State of the Emulator November 2018


Now that I have finished my 6502 emulation section, it is time to decide what to do next. As I have mentioned a few times, my blog is a bit behind where I am with my work on the emulator. What I tend to do is work on the emulator writing articles as I go and then only post an article every fortnight. The reason for doing this is that I knew that my University work (I am currently enrolled in a Master of Science in Computer Science program while working part time) would be taking a lot of my time so I wanted to make sure that I would have material to post. My plan was to also have the blog follow my development down all the ratholes that it leads down. I am rethinking that now as the sound emulation took me down a really windy rathole. To make my blog a bit more coherent, I will be editing my rathole and presenting the information in a bit more structured way.

For those of you who are wondering about the state of my emulator, the graphical portion of the TIA chip has been completed. I still need to implement the sound, which has led me down the random number generation path as the TIA sound generator is based on a LFSR (Looped Feedback Shift Register). After the sound is either implemented or muted, I will be synching the TIA and 6502 chips then implementing the PIA at which point the emulator will be finished.

Before I get to the TIA, I am going to take a bit of a dive into 6502 programming and random number generation by creating several different random number generators for the 6502 and some test games for the 2600. These test games will be used to test our emulator but will likely also result in changes to the assembler I wrote as I discover issues while creating these games. For the people who are interested in creating games for the 2600, this will be a good break. For those of you who are more interested in the emulator, remember that Test Driven Development dictates that you write your tests first so I am simply following TDD principles here.

My delve into random number generation will start first with a rather in-depth look at a particular paper on the subject. This is partially because the paper does a really good job of explaining all the key concepts that are necessary for the creation of a random number generator but mostly because I am presenting the paper as part of my one of my courses so can effectively kill two birds with one stone. This will give a basis for random number generation but then we look at what can actually be done with the rather limited capabilities of the 2600. We will then look at a few techniques that have been used in games while creating one or more games that use those techniques. This will give us a test library for the emulator while also demonstrating what is necessary to create a 2600 game.