Tag: books

  • Chastity’s List of Completed Full Sail University Classes

    This list contains all the classes I completed as part of 3 different programs. My original enrollment was in Game Business and Esports Science, but then I switched to creative writing. After graduation, I took some computer programming classes as part of the ACE (Alumni Continuing Education) program.

    These varied interests I have all have a generic theme. Storytelling as it relates to video games includes two parts. There are the words of the story and how the games are communicated in English to humans. The other side of it is the math that computers understand as well as autistic math nerds like me.

    Joseph Sheckels
    Systems Programming – Online
    SDV3111-O • Term C202603 • Section 02

    Garrett Girod
    Programming II – Online
    COP2334-O • Term C202602 • Section 04

    Davide Bisso
    Career Readiness – Online
    CRR4000-O • Term C202601 • Section 17ACE

    Douglas Arley
    Programming I – Online
    COP1334-O • Term C202601 • Section 08

    Joshua Collier
    Project and Portfolio III: Creative Writing – Online
    CWB338-O • Term C202506 • Section 02

    Matthew Peters
    Publishing and Distribution – Online
    ECW2953-O • Term C202505 • Section 02

    Convert Instructor
    Graduation Launch
    GRAD4000-O • Term C202506 • Section 05

    Joshua Begley
    Literary Genre I: Comedy and Tragedy – Online
    ECW3111-O • Term C202504 • Section 03

    John King
    Project and Portfolio II: Creative Writing – Online
    CWB228-O • Term C202503 • Section 02

    Cory Helms
    Television Writing – Online
    ECW3702-O • Term C202502 • Section 02

    Elise McKenna
    Developing New Worlds: Environment and Historical Research – Online
    ECW2841-O • Term C202501 • Section 02

    Genevieve Tyrrell
    Project and Portfolio I: Creative Writing – Online
    CWB119-O • Term C202412 • Section 01

    Cory Helms
    Writing Workshop I: Film – Online
    ECW4101-O • Term C202411 • Section 02

    Beth Strudgeon
    Introduction to Media Communications and Technologies – Online
    MCM1002-O • Term C202410 • Section 03

    Christopher Ramsey
    Multimedia Storytelling – Online
    ECW1409-O • Term C202410 • Section 01

    Brett Pribble
    Creative Skills Development – Online
    ECW1225-O • Term C202409 • Section 03

    Cory Helms
    Literary Techniques and Story Development – Online
    ECW2123-O • Term C202408 • Section 04

    Becca Godsey
    Professional Development Seminar II: Game Business and Esports – Online
    GBE3222-O • Term C202407 • Section 02

    Aaron Conner
    Project and Portfolio II: Game Business and Esports – Online
    GBE229-O • Term C202407 • Section 01

    Ren Vickers
    Game Business Models – Online
    GBE2501-O • Term C202406 • Section 01

    Shane Marcus
    Physical Science – Online
    PHY3020-O • Term C202405 • Section 05

    Ashley Jones
    Professional Development Seminar I: Game Business and Esports – Online
    GBE1111-O • Term C202404 • Section 01

    Becca Godsey
    Project and Portfolio I: Game Business and Esports – Online
    GBE119-O • Term C202404 • Section 01

    Terry Clark
    College Mathematics – Online
    MGF1213-O • Term C202403 • Section 04

    Otavio Moulin Lessa
    Gaming Culture and Engagement – Online
    GBE2001-O • Term C202402 • Section 01

    Philip Lacinak
    Digital Video and Audio Production – Online
    MCM2416-O • Term C202401 • Section 02

    David Sussman
    English Composition I – Online
    ENC1101-O • Term C202312 • Section 37

    Mike Dunn
    New Media Tools – Online
    MCM1203-O • Term C202311 • Section 09

    Ricky Sellers
    Video-Sharing Platforms – Online
    VID1555-O • Term C202310 • Section 01

    Katherine Coulthart
    Storytelling for Marketing – Online
    MKT163-O • Term C202309 • Section 02

    Alexia Brehm
    Introduction to Marketing – Online
    MKT210-O • Term C202308 • Section 01

    Brandon Morris
    Introduction to Esports Production – Online
    GBE1021-O • Term C202307 • Section 02

    Charles Cardwell
    Introduction to the Gaming Industry – Online
    GBE1001-O • Term C202306 • Section 02

    Jennifer Salzberg
    Psychology of Play – Online
    DEP1013-O • Term C202305 • Section 17

    Eddie Tapia
    Creative Presentation – Online
    GEN1011-O • Term C202304 • Section 26

    Orientation Team
    Full Sail Online Orientation (FSLE) – Online
    GEN2000-O • Term C202304 • Section 06

  • chastelib test suite for 32-bit Linux GNU Assembly Language

    Ever since I figured out the technique for translating NASM source files into GNU Assembler source files, I have been quite excited at the possibilities. I translated the whole chastelib library into this syntax. This means that I could even learn to use these as inline assembly in C programs on Linux. I am not sure what the benefit is unless of course I enter some kind of obfuscated code contest!

    main.s

    # Using Linux System calls for 32-bit
    # Tested with GNU Assembler on Debian 12 (bookworm)
    # It uses Chastity's putstring function for output
    
    .global _start
    
    _start:
    
    
    mov $main_string,%eax # move address of string into eax register
    call   putstring      # call the putstring function Chastity wrote
    
    movl $0x10,radix # set the radix to sixteen or hexadecimal
    movl $1,int_width # set the minimum integer width
    
    mov $input_string,%eax
    call strint
    
    mov %eax,%ebx # copy eax to ebx before we use it in a loop1
    
    movl $0,%eax # zero eax
    
    loop1:
    
    movl $2,radix # set radix to binary
    movl $8,int_width # width of 8 bits
    call putint
    call putspace
    
    movl $0x10,radix # set radix to hexadecimal
    movl $1,int_width # width of 2 hex digits
    call putint
    call putspace
    
    movl $10,radix # set radix to decimal (what humans read)
    movl $3,int_width # width of 3 decimal digits
    call putint
    call putspace
    
    cmp    $0x20,%al
    jb     not_char
    cmp    $0x7e,%al
    ja     not_char
    
    call putspace
    call putchar  # print the character if it is in the range 0x20 to 0x7E
    
    not_char:
    
    call putline
    inc    %eax
    cmp    %ebx,%eax
    jne    loop1
    
    mov    $0x1,%eax      # system call 1 is exit
    mov    $0x0,%ebx      # we want to return code 0
    int    $0x80          # end program with system call
    
    main_string:
    .string	"This program is the official test suite for the Linux Assembly version of chastelib.\n"
    
    input_string:
    .string	"100"
    
    putstring:            # the start of the putstring function
    push   %eax
    push   %ebx
    push   %ecx
    push   %edx
    mov    %eax,%ebx
    
    putstring_strlen_start:
    cmpb   $0x0,(%ebx)
    je     putstring_strlen_end
    inc    %ebx
    jmp    putstring_strlen_start
    
    putstring_strlen_end:
    sub    %eax,%ebx # subtract eax from ebx for number of bytes to write
    mov    %ebx,%edx # copy number of bytes from ebx to edx
    mov    %eax,%ecx # address of string to output
    mov    $0x1,%ebx # file handler 1 is stdout
    mov    $0x4,%eax # system call 4 is write
    int    $0x80
    
    pop    %edx
    pop    %ecx
    pop    %ebx
    pop    %eax
    ret
    
    .data        # must declare data section for mutable memory
    
    int_string:  # storage for the bytes of an integer
    .skip 32,'?' # unknown bytes represented with question marks
    .byte 0      # terminating zero of this string
    
    int_newline: # optional newline to print after a number
    .byte 0xA,0
    
    radix: .long 2
    int_width: .long 8
    
    intstr: # start of the intstr function
    mov    $int_string+31,%ebx
    mov    $0x1,%ecx
    
    digits_start:
    mov    $0x0,%edx
    divl   radix            # divide by number at address radix
    cmp    $0xa,%edx
    jb     decimal_digit
    jae    hexadecimal_digit
    
    decimal_digit:
    add    $0x30,%edx
    jmp    save_digit
    
    hexadecimal_digit:
    sub    $0xa,%edx
    add    $0x41,%edx
    
    save_digit:
    mov    %dl,(%ebx)
    cmp    $0x0,%eax
    je     intstr_end
    dec    %ebx
    inc    %ecx
    jmp    digits_start
    
    intstr_end:
    cmp    int_width,%ecx # see if ecx is above or equal to the integer width we want
    jae    end_zeros
    dec    %ebx
    movb   $0x30,(%ebx)
    inc    %ecx
    jmp    intstr_end
    
    end_zeros:
    mov    %ebx,%eax
    ret
    
    putint: # the putint function calls intstr and then putstring to display any number
    
    push   %eax
    push   %ebx
    push   %ecx
    push   %edx
    call   intstr
    call   putstring
    pop    %edx
    pop    %ecx
    pop    %ebx
    pop    %eax
    ret
    
    # the strint function is arguably the most complicated assembly function I have ever written
    # it can convert any string into a number based on the current radix
    # as soon as it finds a zero byte or a charact that is not a valid digit in that radix
    # it will return the value in the eax register so it can be printed or used elsewhere
    
    strint:
    mov    %eax,%ebx # copy string address from eax to ebx because eax will be replaced soon!
    mov    $0x0,%eax # eax set to zero before digits multiplied in
    
    
    read_strint:
    mov    $0x0,%ecx
    mov    (%ebx),%cl
    inc    %ebx
    cmp    $0x0,%cl
    je     strint_end
    cmp    $0x30,%cl
    jb     not_digit
    cmp    $0x39,%cl
    ja     not_digit
    
    is_digit:
    sub    $0x30,%cl
    jmp    process_char
    
    not_digit:
    cmp    $0x41,%cl
    jb     not_upper
    cmp    $0x5a,%cl
    ja     not_upper
    
    is_upper:
    sub    $0x41,%cl
    add    $0xa,%cl
    jmp    process_char
    
    not_upper:
    cmp    $0x61,%cl
    jb     not_lower
    cmp    $0x7a,%cl
    ja     not_lower
    
    is_lower:
    sub    $0x61,%cl
    add    $0xa,%cl
    jmp    process_char
    
    not_lower:
    jmp    strint_end
    
    process_char:
    cmp    radix,%ecx
    jae    strint_end
    mov    $0x0,%edx
    mull   radix
    add    %ecx,%eax
    jmp    read_strint
    
    strint_end:
    ret
    
    space: .byte ' ',0
    line: .byte 0x0A,0
    
    putspace:
    push   %eax
    mov    $space,%eax
    call   putstring
    pop    %eax
    ret
    
    putline:
    push   %eax
    mov    $line,%eax
    call   putstring
    pop    %eax
    ret
    
    char: .byte 0,0 # where char data is temporarily stored by the putchar function
    
    putchar:
    push   %eax
    mov    %al,char
    mov    $char,%eax
    call   putstring
    pop    %eax
    ret
    
    # This Assembly source file has been formatted for the GNU assembler.
    # The following makefile rule has commands to assemble, link, and run the program
    #
    #main-gas:
    #	gcc -nostdlib -nostartfiles -nodefaultlibs -static main.s -o main -m32
    #	strip main
    #	./main
    
    

  • Hacking Minecraft Java Edition with chastehex

    The save files on my Linux machine are here:

    /home/chastity/.minecraft/saves/

    I decided to see if my chastehex program would be any use at editing save files of Minecraft.

    The first step is to use chastecmp (another program I wrote) to compare two files of slight differences.

    The first target was the level.dat file. I had created a new world, collected 3 oak logs from a tree, and saved.

    Debian Linux detected that the level.dat file was actually a gzip archive. Therefore, to get the true data, these commands are required. The first copies it so that it has a “.gz” extension. The second decompresses it.

    cp level.dat file0.gz
    gzip -d file0.gz
    

    Now there is a file named file0 which has the raw data uncompressed. The next step is to load up the game, make a small change and then resave the file. I threw away one oak log so that I had 2 instead of 3. Then I saved the game and ran these commands to get the uncompressed data for the second file.

    cp level.dat file1.gz
    gzip -d file1.gz
    

    I compared the two files with chastecmp:

    chastecmp file0 file1

    And the result was:

    file0 Opened OK
    file1 Opened OK
    00000052 48 CF 
    000003E9 48 CF 
    000007FE 48 CF 
    000009F0 03 02 
    000011D2 69 68 
    000011D3 0E 87 
    000011E5 FB 74 
    0000124B 72 81 
    0000124C EE C7 
    0000124D 99 BA 
    file0 has reached EOF
    

    It appears that address 9F0 contains the amount of oak logs in the first item slot in the game.

    I ran this command to change that byte to 20 hex/32 decimal

    chastehex file0 9F0 20

    The next step is to recompress the data into a level.dat file that the game expects to load.

    gzip -k file0
    cp file0.gz level.dat
    

    Amazingly, when I loaded the game, I did in fact have 32 oak logs. Obviously this process requires multiple steps and is painfully slow, however it proves that my command line tools can hack Minecraft because there is compression but no encryption in the files.

    The level.dat file seems to contain the player’s inventory and other important data. I remember this from experiments with it years ago.

    Warning

    The addresses and what they mean can change wildly as new data is added to the file. For example, I found a village and there were 5 iron ingots in a chest. I repeated the steps above to create two uncompressed files.

    The difference between the files in this case were that I threw 3 of the ingots on the ground and so the number had changed from 5 to 2 in the chastecmp file0 file1 output

    00000F5F 05 02

    So then I ran the command to change the count to 64 (40 hex)

    chastehex file0 F5F 40

    Upon recompressing the file and putting it back in the game folder, I did have 64 ingots. I had previously tried numbers higher than 64 but unfortunately the results were not good. I ended up with only one ingot instead. Therefore, it is good to stick within the limits of what the game expects for the cheating to be successful.

    But because the addresses change as new data gets added to the game, cheating by hex editing is painfully slow on Minecraft. This is best done on a brand new world, both because the data is small and also so that you don’t corrupt worlds you have been playing on longer.

    But I did it as a proof of concept just to see if the programs I wrote can be used to hack Minecraft. The answer is yes, with a little help from gzip for decompression and recompression.

    But what if I told you there was an easier way to cheat at Minecraft Java Edition? You see, the secret still lies with the level.dat file. You don’t actually need to use chastehex, chastecmp, or compression. This is because the file contains the player inventory but not the items they have stored in chests in the world! This allows for item duplication.

    So place the items you want to duplicate in your inventory. Then save the game and backup the file.

    cp level.dat backup.dat

    Then place those items in a chest then save again. Restore the file you backed up earlier.

    cp backup.dat level.dat

    When you reload the game, the files will still be in the chest but your player will also be holding them. This means you can infinitely duplicate any item you can obtain in the game normally by just copying save files repeatedly.

    Why then, did I go through the process of showing how to cheat with chastehex? Because the point is not so much about hacking the game, or what the game is, but it is about testing the programs I wrote. I care more about my C and Assembly programming skills than I do the outcome of a game.

    The point is not whether you win or lose the game. The point is that the game was made by humans and can be broken by humans. Sometimes, as in Castle of the Winds or Cave Story, hacking with a hex editor is the most reliable method. In a game like Minecraft, sometimes cheating is easier because of player and world data being in completely separate files.

  • Professional vs Open Source

    I totally spent 5 hours writing a program in Assembly Language. I realized that what I am doing is something that cannot be done for money in any way. The best that I can do is to learn the technical skills and then continue working on my books and API references I plan to write.

    But as far as my programs themselves, they don’t fit the model of how the world works. In a job, you are constantly pressured to do as much work in as short of a time as possible. Therefore, you are paid, hired, or fired based on how fast the program can be written for the client, regardless of whether it works correctly or has bugs or security flaws.

    But when I write computer software for myself, I am the only one to decide whether it meets my standards. I have said many times over the past 20 years that I would not want a job as a programmer. This is because I am only interested in the things I want to do. I find that I am at peace when the things I do are not attached to the love of money.

    I believe that money and the corporate world actually ruins top quality work. There are also things that the Open-Source Software movement has made possible that could never be done under a company with a proprietary system. Strangers who don’t even know each other offer improvements on programming forums to people out of the goodness of their heart with no financial incentive.

    I see something similar in the world of Chess. People who are playing for fun can enjoy the game at a higher level than those who are stressed out competing in tournaments to win money. I sometimes feel myself pulled in a direction I didn’t know existed. I will work to explore this feeling I get where I achieve inner peace for a moment when I am having pure fun and losing track of the time.

    I used to feel this way when playing video games as a kid. Now I get it from writing books, blog posts, and computer programs. I still enjoy games though. I plan to eventually getting back into my games but I have had a busy life lately.

  • Life and Career Update

    A lot of cool things have been happening in my life lately. Most of it is good news. I have not been posting on my blog much because I have not had the time. I started a new department at Walmart and so far I enjoy it better than stocking. I work in Maintenance which really means I am helping clean the store. Sometimes emptying trash, sometimes sweeping or scrubbing the floor, and sometimes cleaning the bathrooms, which is difficult only because there are a lot of little things to remember such as filling the supplies and also mopping the floor in the correct way.

    But I think what I love most about my new job as a Maintenance Mop Monkey is how my brain is free to think of other things while I am working because it takes a lot less concentration than stocking does. What am I thinking of during this time? The image below is a fine example of my thoughts!

    I have been programming in Assembly Language for DOS lately. I find Computer Programming to be suspiciously relaxing because the world of math and computers is one where humans can’t hurt me.

    The only risk I face while on my computer is when I get on social media and see hateful things directed at Transgender people, immigrants, or people in other countries. There are plenty of things I could say about what is going on in the world. However, I am not going to do any of that because I have realized that to become a better writer, programmer, and Chess player, I must maintain my supreme autistic focus because that is my gift from God.

    Anyway, when computer programming, there are only numbers. The arithmetic operations of addition, subtraction, multiplication, and division never change and I can count on them more than I can people. My time is better spent improving my code and working on my current book project for teaching DOS Assembly Language. I have even created a simple cover for it.

    The theme is black background with white text because this is the way the DOS (Disk Operating System) looks.

    The goal of this book is a little bit different than most of my books. In fact the target audience for this book is very niche. People don’t write programs for DOS unless it it for fun. There is no money in being able to write programs for DOS because the rest of the world has moved to Windows, MacOS, and Linux which support 32 and 64 bit systems with more capability and 16 bit DOS.

    Instead, this book will be my first computer programming book for the purpose of both teaching Assembly Language to the nerds of the world and as an exercise of my Technical Writing skills. This will be the third technical writing book.

    The first book was Chastity’s Chess Chapters for teaching Chess to people of every kind.

    The second was Minimal Markdown for Authors for teaching other writers how to format and publish their books using similar methods to what I have used.

    This next book, Assembly Arithmetic Algorithms, will be my entry into publishing books about computer programming. This special interest of mine has gone largely ignored because people who write computer programs are *not normal people at all! Computer programming takes concentration, lack of a social life, and the ability to read a lot! I read programming tutorials and books when I have free time. Some of them are free online and others I have bought from various sources in paperback and digital form.

    I can’t claim to be a great programmer, but what I can do is squeeze the information I have learned into a form that allows other people to learn the same things faster. Aside from teaching Chess, I also volunteer to teach computer programming to friends who are interested in learning. I can easily throw together lessons based on questions they have. Where I will find the time for this? I don’t have a clue.

    But the goal of writing books and recording video tutorials is so that eventually I can have a career that does not depend on working at Walmart forever. Although Walmart is going fairly well, I know that the wrong people in management can take away my job if they feel like it. What they cannot take away is my writing, math, and computer skills which I hope will make a difference for people even after I am long dead.

    Also, my Creative Writing diploma finally came!

    I found my time with Full Sail University to be quite positive. I was inspired as I learn the potential there is for someone with the patience to write. My experience with Open Source Software will also be an asset to me because I can use tools that no college or tech company even will know about.

    As I think about possible careers, I think how much potential I have in terms of experience at previous jobs but also skills of writing and technical details that most people simply haven’t learned because it takes someone with the willingness to learn for the fun of it even when there is no promise of financial gain. If I do make money in a future career using my skills, that is great, but it is not the primary motive.

    I remember the words of Carol Keepes who used to be my Assistant Manager back in 2012 when I was a courtesy clerk at Hy-Vee. She said “90% of what people do, they wouldn’t be doing if it wasn’t about money.” I think about this often and it is the reason I have made decisions in life that look foolish to most of the world. I want to make sure that I did things because I really loved the process rather than viewing them as a means to an end.

    See my post The Prayer of Saint Chastity for clarification on my priorities.