1whatleytay / saturn

A modern MIPS interpreter and assembler.
MIT License
29 stars 6 forks source link

Tetris demo code freezes Saturn #20

Open by20c opened 3 months ago

by20c commented 3 months ago

tested on v0.1.9a, v0.1.9, v0.1.8, v0.1.5

This demo code freezes the program:

################ CSC258H1F Winter 2024 Assembly Final Project ##################
# This file contains our implementation of Tetris.
#
# Student 1: Name, Student Number
# Student 2: Name, Student Number (if applicable)
######################## Bitmap Display Configuration ########################
# - Unit width in pixels:       TODO
# - Unit height in pixels:      TODO
# - Display width in pixels:    TODO
# - Display height in pixels:   TODO
# - Base Address for Display:   0x10008000 ($gp)
##############################################################################

    .data
##############################################################################
# Immutable Data
##############################################################################
# The address of the bitmap display. Don't forget to connect it!
ADDR_DSPL:
    .word 0x10008000
# The address of the keyboard. Don't forget to connect it!
ADDR_KBRD:
    .word 0xffff0000

##############################################################################
# Mutable Data
##############################################################################

##############################################################################
# Code
##############################################################################
    .text
    .globl main

    # Run the Tetris game.
main:
    # Initialize the game

game_loop:
    # 1a. Check if key has been pressed
    # 1b. Check which key has been pressed
    # 2a. Check for collisions
    # 2b. Update locations (paddle, ball)
    # 3. Draw the screen
    # 4. Sleep

    #5. Go back to 1
    b game_loop
1whatleytay commented 3 months ago

Made more changes to the v0.1.9a branch. Can you download the build https://github.com/1whatleytay/saturn/releases/tag/app-v0.1.9a here again and tell me if it's better? The build should say "Updated 5 mins ago," it's not the same as the build last night.

by20c commented 3 months ago

Now it works and has no freezing for the demo!

1whatleytay commented 3 months ago

I pushed (another) update to v0.1.9a to make it a good amount faster. Hopefully it still works. If this version works too, I can merge these changes into the regular v0.1.9.

by20c commented 3 months ago

unfortunately, this version still freezes. However, it is not as severe compared to when I first encountered the error