i think i will go with the inc file and thanks for all the help now i can hopefully get my game finished.
I still think you should put the game on hold until you have game programming experience in a higher level language.
something1990 wrote:
I still think you should put the game on hold until you have game programming experience in a higher level language.
Yeah, I agree. It's better to understand the whole thing completely before you start programming than get it piecemeal.
well i added the routines and i am still having trouble. My problem now is that none of the code works at all. It wont even display the stats. Here is all of my code can someone tell me how to make it work:
Code:
Code:
#include "begin.inc" ;Do not forget to set done label when done
#include "routines.inc"
.LIST
attack .equ $858F
defense .equ $858F+1
level .equ $858F+2
gold .equ $858F+3
.org 9327h
game:
call _clrLCDFull
call _runIndicOff
set textinverse,(iy+textflags)
ld hl,8*256+35
ld (pencol),hl
ld hl,begin
call _vputs
ld hl,23*256+35
ld (pencol),hl
ld hl,about
call _vputs
ld hl,38*256+35
ld (pencol),hl
ld hl,quit
call _vputs
jp choice
begin:
.db "Start",0
about:
.db "About",0
quit:
.db "Quit",0
choice:
set textinverse,(iy+textflags)
ld hl,8*256+35
ld (pencol),hl
ld hl,begin
call _vputs
res textinverse,(iy+textflags)
ld hl,23*256+35
ld (pencol),hl
ld hl,about
call _vputs
ld hl,38*256+35
ld (pencol),hl
ld hl,quit
call _vputs
call _getk
call _op2toop1
call _convop1
cp 105
jp z,start
cp 34
jp z,choice1
jp nz,choice
choice1:
res textinverse,(iy+textflags)
ld hl,8*256+35
ld (pencol),hl
ld hl,begin
call _vputs
set textinverse,(iy+textflags)
ld hl,23*256+35
ld (pencol),hl
ld hl,about
call _vputs
res textinverse,(iy+textflags)
ld hl,38*256+35
ld (pencol),hl
ld hl,quit
call _vputs
call _getk
call _op2toop1
call _convop1
cp 105
jp z,about1
cp 34
jp z,choice2
cp 25
jp z,choice
jp nz,choice1
choice2:
res textinverse,(iy+textflags)
ld hl,8*256+35
ld (pencol),hl
ld hl,begin
call _vputs
res textinverse,(iy+textflags)
ld hl,23*256+35
ld (pencol),hl
ld hl,about
call _vputs
set textinverse,(iy+textflags)
ld hl,38*256+35
ld (pencol),hl
ld hl,quit
call _vputs
call _getk
call _op2toop1
call _convop1
cp 105
jp z,done
cp 25
jp z,choice1
jp nz,choice2
about1:
call _clrLCDFull
ld hl,0*256+0
ld (pencol),hl
ld hl,info
call _vputs
ld hl,6*256+0
ld (pencol),hl
ld hl,info1
call _vputs
ld hl,12*256+0
ld (pencol),hl
ld hl,info2
call _vputs
ld hl,18*256+0
ld (pencol),hl
ld hl,info3
call _vputs
ld hl,24*256+0
ld (pencol),hl
ld hl,info4
call _vputs
ld hl,30*256+0
ld (pencol),hl
ld hl,info5
call _vputs
ld hl,36*256+0
ld (pencol),hl
ld hl,info6
call _vputs
ld hl,42*256+0
ld (pencol),hl
ld hl,info7
call _vputs
ld hl,48*256+0
ld (pencol),hl
ld hl,info8
call _vputs
jp enter
info:
.db "This is an rpg programmed",0
info1:
.db "in assembly. As of now",0
info2:
.db "I do not know much asm",0
info3:
.db "so the layout will not",0
info4:
.db "be pretty. Most of the menus",0
info5:
.db "will be push the button",0
info6:
.db "for your choice but it",0
info7:
.db "will change as i learn",0
info8:
.db "more.",0
enter:
call _getk
call _op2toop1
call _convop1
cp 105
jp z,game
jp nz,enter
start:
call _clrLCDFull
res textinverse,(iy+textflags)
ld hl,0*256+0
ld (pencol),hl
ld hl,welcome
call _vputs
ld hl,6*256+0
ld (pencol),hl
ld hl,welcome1
call _vputs
ld hl,12*256+0
ld (pencol),hl
ld hl,welcome2
call _vputs
ld hl,18*256+0
ld (pencol),hl
ld hl,welcome3
call _vputs
ld hl,24*256+0
ld (pencol),hl
ld hl,welcome4
call _vputs
ld hl,30*256+0
ld (pencol),hl
ld hl,welcome5
call _vputs
ld hl,36*256+0
ld (pencol),hl
ld hl,welcome6
call _vputs
ld hl,42*256+0
ld (pencol),hl
ld hl,welcome7
call _vputs
ld hl,48*256+0
ld (pencol),hl
ld hl,welcome8
call _vputs
jp enter1
welcome:
.db "Welcome young traveler",0
welcome1:
.db "I would ask for your name",0
welcome2:
.db "but nobody cares so now",0
welcome3:
.db "you are forever known as",0
welcome4:
.db "Traveler. Just step into",0
welcome5:
.db "this portal and you will be",0
welcome6:
.db "explained the situation and",0
welcome7:
.db "we will find out more",0
welcome8:
.db "about you.",0
enter1:
call _getk
call _op2toop1
call _convop1
cp 105
jp z,raceselection
jp nz,enter1
raceselection:
call _clrLCDFull
set textinverse,(iy+textflags)
ld hl,0*256+23
ld (pencol),hl
ld hl,race
call _vputs
res textinverse,(iy+textflags)
ld hl,10*256+38
ld (pencol),hl
ld hl,race1
call _vputs
ld hl,25*256+38
ld (pencol),hl
ld hl,race2
call _vputs
ld hl,40*256+44
ld (pencol),hl
ld hl,race3
call _vputs
jp choice3
race:
.db "Race Selection",0
race1:
.db "Human",0
race2:
.db "Dwarf",0
race3:
.db "Elf",0
choice3:
res textinverse,(iy+textflags)
ld hl,25*256+32
ld (pencol),hl
ld hl,clr
call _vputs
ld hl,10*256+32
ld (pencol),hl
ld hl,sym
call _vputs
ld hl,25*256+0
ld (pencol),hl
ld hl,clr
call _vputs
call _getk
call _op2toop1
call _convop1
cp 105
jp z,statshuman
cp 34
jp z,choice4
jp nz,choice3
choice4:
ld hl,10*256+32
ld (pencol),hl
ld hl,clr
call _vputs
ld hl,40*256+38
ld (pencol),hl
ld hl,clr
call _vputs
ld hl,25*256+32
ld (pencol),hl
ld hl,sym
call _vputs
call _getk
call _op2toop1
call _convop1
cp 105
jp z,statsdwarf
cp 25
jp z,choice3
cp 34
jp z,choice5
jp nz,choice4
choice5:
ld hl,25*256+32
ld (pencol),hl
ld hl,clr
call _vputs
ld hl,40*256+38
ld (pencol),hl
ld hl,sym
call _vputs
call _getk
call _op2toop1
call _convop1
cp 105
jp z,statself
cp 25
jp z,choice4
jp nz,choice5
sym:
.db "*",0
clr:
.db " ",0
statshuman:
ld hl,5
ld (attack),hl
ld hl,5
ld (defense),hl
ld hl,150
ld (gold),hl
ld hl,1
ld (level),hl
jp done
statsdwarf:
ld hl,7
ld (attack),hl
ld hl,6
ld (defense),hl
ld hl,150
ld (gold),hl
ld hl,1
ld (level),hl
jp done
statself:
ld hl,6
ld (attack),hl
ld hl,
ld (defense),hl
ld hl,150
ld (gold),hl
ld hl,1
ld (level),hl
jp done
done:
call _homeup
ld a,(gold)
call vdispA
ret
.end
END
I recommend you do something like this:
Code:
Increasing the number by 1 for each segment in your program and pinpointing the exact location of the error before you ask another question. You have to do some work on debugging your project as well
Code:
or a
ld (penrow),a
ld (pencol),a
ld hl, first
call _vputs
first:
.db "1",0
Increasing the number by 1 for each segment in your program and pinpointing the exact location of the error before you ask another question. You have to do some work on debugging your project as well
something1990 wrote:
I'm wondering if he even tried that, or anything else in BASIC.
I got the impression from some of his posts that he's used BASIC before, but still. I mean, c'mon, that's insanely unoptimized.
hey i am new to asm so i do not know all the ins and outs but i am going to delete it and read a couple more of the tutorials a couple times.
lafferjm wrote:
hey I am new to asm so I do not know all the ins and outs but I am going to delete it and read a couple more of the tutorials a couple times.
Don't delete it, but do realize for something as text intensive and repetitive programming-wise as this, BASIC is far better.
1.) inc files are just regular text files, except you tell your computer to save it as with a ".inc" extension. That extension allows the linker? to link all the files and make it into one binary file for your calculator.
2.) @something1990: ASM was actually my 2nd programming language. Basic was my first. I think the reason why everything clicked instantly was because I was bad at basic. btw, you've made a lot of progress in ASM
3.) Kerm: sometimes is just better to delete some stuff, or at least remove it from your mind. When i started programming 83+ calcs in basic in fall of 2004 (i never owned one btw) I was really frustrated at first by the fact my pixel-on based sprite routines were so slow. I got rid of everything (but apparently my friend had backed up the calc, he returned the basic files) and just stopped for a long time. Then fall of the previous year, I saw xlib xlib revolution and said to myself, if kevin can do that in basic, so can I. Also, Nanowar's Wizards was also featured that month. So i sent emails to both. They introduced me to these forums. Since then, I've picked up a lot because everything was just fresh, no previous baggage.
4.) imho, i believe sprite based games are easier than data based ones. trying to make a text based rpg in ASM that resembles a basic one is very difficult. I probably would have trouble writing a fast divide by 10 algorithm (then again i wouldn't need to on a 68k ) so I have to say ASM is difficult. If it wasn't for ion's sprite routines, I probably would left the forums.
I say, don't give up. Just let go and open your mind to new ideas and concepts.
2.) @something1990: ASM was actually my 2nd programming language. Basic was my first. I think the reason why everything clicked instantly was because I was bad at basic. btw, you've made a lot of progress in ASM
3.) Kerm: sometimes is just better to delete some stuff, or at least remove it from your mind. When i started programming 83+ calcs in basic in fall of 2004 (i never owned one btw) I was really frustrated at first by the fact my pixel-on based sprite routines were so slow. I got rid of everything (but apparently my friend had backed up the calc, he returned the basic files) and just stopped for a long time. Then fall of the previous year, I saw xlib xlib revolution and said to myself, if kevin can do that in basic, so can I. Also, Nanowar's Wizards was also featured that month. So i sent emails to both. They introduced me to these forums. Since then, I've picked up a lot because everything was just fresh, no previous baggage.
4.) imho, i believe sprite based games are easier than data based ones. trying to make a text based rpg in ASM that resembles a basic one is very difficult. I probably would have trouble writing a fast divide by 10 algorithm (then again i wouldn't need to on a 68k ) so I have to say ASM is difficult. If it wasn't for ion's sprite routines, I probably would left the forums.
I say, don't give up. Just let go and open your mind to new ideas and concepts.
Excellent points, and I agree with them all. I have no problem with Lafferjm using ASM for this; it just looked like BASIC would make it smaller if somewhat slower from the code.
well i deleted it before i read yalls post. so since i need a lot of tutorials do you know ones other than asmguru, phil killeweeds logs, and asm in 28 days.
This is the best place to go for a list of all of the best asm tutorials, compilers, and IDEs.
well i found one that might work and i am going to read it 28 days and asmguru a little bit. the only thing is that asmguru is a little stupid because it does not explain all that good. and how exactly could i do an rpg that is not stat oriented.
Do you mean stat as in the statistics variables on the calculator, or stat as in characters with stats? In either case, you could just not do that, but why would you want to?
Personally, I don't think very highly of asmguru. I don't think it explains things well, or in a structured order. To me, it's just an alright reference.
Personally, I don't think very highly of asmguru. I don't think it explains things well, or in a structured order. To me, it's just an alright reference.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2, 3, 4, 5 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 4 of 5
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement