- Yahtzee CE Edition issues and progress
- 13 Jan 2017 02:17:28 pm
- Last edited by ACagliano on 14 Jan 2017 11:04:17 am; edited 1 time in total
After a long programmatical "dark age" I decided to get back into assembly programming, because I kind of missed it. The first project I revitalized was my Yahtzee game for the TI-84+, this time done as a CE program.
To my surprise I quickly got a working compile that did not crash. However, graphical issues persisted, which I fixed with the help of a few individuals in SAX. Now, I find that the program crashes right as soon as I press Clear from the splash screen. Now I ran the program again, pressing a few other keys (to ensure the glitch wasn't happening in the in-game getCSC loop), and it doesn't crash. It crashes when i press Clear. This leads me to believe that the crashing code is within the below segment. The crash occurs whether I do the resetting this way or call gfx_End. I have enclosed the source of my program thus far below.
Code:
Source: http://pastebin.com/esGkBAZ2
* I changed the kdbscan loop to be very minimal, ensuring no other code is executing in the loop. You should literally press Clear, and then the game quits.
Edit: Because its missing from the paste, the content of the MainMenu label:
Code:
Crash: Resolved
To my surprise I quickly got a working compile that did not crash. However, graphical issues persisted, which I fixed with the help of a few individuals in SAX. Now, I find that the program crashes right as soon as I press Clear from the splash screen. Now I ran the program again, pressing a few other keys (to ensure the glitch wasn't happening in the in-game getCSC loop), and it doesn't crash. It crashes when i press Clear. This leads me to believe that the crashing code is within the below segment. The crash occurs whether I do the resetting this way or call gfx_End. I have enclosed the source of my program thus far below.
Code:
Quit:
call _ClrScrn
ld a,lcdbpp16
ld (mpLcdCtrl),a
call _DrawStatusBar
ei
ret
Source: http://pastebin.com/esGkBAZ2
* I changed the kdbscan loop to be very minimal, ensuring no other code is executing in the loop. You should literally press Clear, and then the game quits.
Edit: Because its missing from the paste, the content of the MainMenu label:
Code:
MainMenu:
; SPLASH SCREEN
; set screen to yellow
ld a, cYellow \ ld hl, vram
ld bc, 320*240
call _MemSet
; create red banner
ld a, cRed \ ld hl, vram
ld bc, 320*45
call _MemSet
; render text
ld a, cYellow \ ld hl, 0
ld l, a
push hl
call gfx_SetTextFGColor
pop hl
ld a, cRed \ ld l, a
push hl
call gfx_SetTextBGColor
pop hl
ld hl,3
push hl
push hl
call gfx_setTextScale
pop hl
pop hl
ld hl, 0 \ ld bc, 0 \ ld de, 0
ld l, 10 \ ld c, 32 \ ld de, TitleText
push hl
push bc
push de
call gfx_PrintStringXY
pop de
pop bc
pop hl
ld a, cRed \ ld hl, 0
ld l, a
push hl
call gfx_SetTextFGColor
pop hl
ld a, cYellow \ ld l, a
push hl
call gfx_SetTextBGColor
pop hl
ld hl,2
push hl
push hl
call gfx_setTextScale
pop hl
pop hl
ld hl, 0
ld l, 70 \ ld c, 7 \ ld de, AnyKeyText
push hl
push bc
push de
call gfx_PrintStringXY
pop de
pop bc
pop hl
ld hl, 2
push hl
push hl
ld hl, 150 \ ld bc, 60
push hl
push bc
ld hl, Die1
push hl
call gfx_SSprite
pop hl
pop hl
ld hl, 92
push hl
ld hl, Die2
push hl
call gfx_SSprite
pop hl
pop hl
ld hl, 124
push hl
ld hl, Die3
push hl
call gfx_SSprite
pop hl
pop hl
ld hl, 156
push hl
ld hl, Die4
push hl
call gfx_SSprite
pop hl
pop hl
ld hl, 188
push hl
ld hl, Die5
push hl
call gfx_SSprite
pop hl
pop hl
ld hl, 220
push hl
ld hl, Die6
push hl
call gfx_SSprite
pop hl
pop hl
pop hl
pop hl
pop hl
ret
Crash: Resolved