Search found 512 matches

by 777
Mon Mar 18, 2024 3:56 am
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

Isn't xpos same as Xcoordinate? You haven't shown where you defined xpos. You probably want to remove that and replace the LD A, (xpos) with LD A, (Xcoordinate) instead. EDIT: Ok I see where you define xpos... you don't update that though only Xcoordinate. EDIT2: You kind of update it but you are u...
by 777
Mon Mar 18, 2024 3:40 am
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

Ok well don't do that when you are learning. It's an advanced optimisation technique which makes the code harder to understand and debug. I can't see any need for it here either, keyboard reading is negligible jiffyswise compared to drawing stuff and ting. Always use a label anyway... ok, ive chang...
by 777
Mon Mar 18, 2024 3:29 am
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

Self modifying code? You sound like you're only learning, I'd knock that on the head for a good while ;) If you wanted to modify the operand it would be at the opcode + 1 address anyway? Never use a hardcoded address anyway, you have an assembler to work that stuff out for you. yes, thats what i me...
by 777
Mon Mar 18, 2024 3:22 am
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

Not running isn't very helpful ;) Say how it does not work. Did it compile? If you are using an emulator use the debugger to put breakpoints on the code paths and step through. My code looks ok to me but it is way past beer o'clock so disclaimers apply. EDIT: This looks a bit dodgy ld (30069),a whe...
by 777
Mon Mar 18, 2024 3:12 am
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

Easiest way is to check the Xcoordinate before you decrement it and if it is 0 skip writing it back. You can use ld a, (Xcoordinate) or a ; same as cp 0 but faster and smaller jr z, .skipmoveleft dec a ld (Xcoordinate), a .skipmoveleft for that EDIT: So with your code DecreaseX ld bc, Key2 ; Bit 0 ...
by 777
Mon Mar 18, 2024 2:40 am
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

well u know what im going to ask u now dont u? how do i get it to move the character the other way? heres what i have so far but it doesnt work. i tried to adapt it. im using the x key i did try swapping the key and key2 labels around and reads the key fine... ; ; ROM routine addresses ; ROM_CLS EQU...
by 777
Sun Mar 17, 2024 5:30 pm
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

Re: what would this be equivilent to in assembler?

There's lots of ways depending on whether X is in a register or memory location, whether it can go larger than 255, whether you want it to wrap or stop at a certain max value, whether you want to do something with X after increasing it, etc. But something like this is a good start: Key.SpSsMNB equ ...
by 777
Sun Mar 17, 2024 2:22 pm
Forum: Programming
Topic: what would this be equivilent to in assembler?
Replies: 33
Views: 645

what would this be equivilent to in assembler?

if inkeys$="m" then x=x+1

i understand the keyboard matrix is read differently in assembler/m code
by 777
Sat Dec 30, 2023 12:04 pm
Forum: Sinclair Miscellaneous
Topic: any idea if this book cover is a real game?
Replies: 1
Views: 226

any idea if this book cover is a real game?

Image

or is it just something they made up?
by 777
Sat Dec 30, 2023 11:43 am
Forum: Games/Software
Topic: where do i put type ins that i have typed in?
Replies: 2
Views: 217

Re: where do i put type ins that i have typed in?

Hi @777, They are all already typed in. https://spectrumcomputing.co.uk/entry/2000018/Book/Sixty_Programs_for_the_Sinclair_ZX_Spectrum If you type in something that is not already in the archive you can either upload to Dropbox or similar and share in the preservation section, or use the upload for...
by 777
Sat Dec 30, 2023 2:07 am
Forum: Games/Software
Topic: where do i put type ins that i have typed in?
Replies: 2
Views: 217

where do i put type ins that i have typed in?

im using 60 programs for that sinclair zx spectrum and have just typed in invaders. i had a look on google and couldnt see it anywhere. also i would like help to debug this one as there are a few things that arent quite right.
by 777
Fri Sep 08, 2023 1:37 am
Forum: Games/Software
Topic: C.S.C.G.C 2023 is open for entries
Replies: 475
Views: 12272

Re: C.S.C.G.C 2023 is open for entries

Jbizzel wrote: Thu Sep 07, 2023 7:38 pm You know what to do.
do i just send them to you?
by 777
Thu Sep 07, 2023 1:11 am
Forum: Games/Software
Topic: C.S.C.G.C 2023 is open for entries
Replies: 475
Views: 12272

Re: C.S.C.G.C 2023 is open for entries

Jbizzel wrote: Tue Sep 05, 2023 8:32 pm
what about just a crap program competition? ive got plenty of those...
by 777
Sun Aug 13, 2023 8:55 pm
Forum: Design/Ideas
Topic: decolourizing games
Replies: 53
Views: 1724

Re: decolourizing games

Certainly not. And you chose a game with really good usage of colour. Maybe something with a very bad colour clash would benefit from removing the colour but I still doubt it. And there is also an easy trick to get your result - use black and white TV :) a better example maybe? https://i.postimg.cc...
by 777
Sun Aug 13, 2023 4:44 pm
Forum: Design/Ideas
Topic: decolourizing games
Replies: 53
Views: 1724

Re: decolourizing games

blucey wrote: Sun Aug 13, 2023 4:29 pm Please don't Tiertex my favourite colourful games.
yeah it just a bad example, i know
by 777
Sun Aug 13, 2023 2:14 pm
Forum: Design/Ideas
Topic: decolourizing games
Replies: 53
Views: 1724

decolourizing games

i just had a thought. would some games look better decolorized?

take a look at this for example:

Image
by 777
Tue Jul 11, 2023 10:11 pm
Forum: Programming
Topic: im looking for a way to turn the bright flag on and off in assembler
Replies: 10
Views: 351

Re: im looking for a way to turn the bright flag on and off in assembler

Waldroid wrote: Tue Jul 11, 2023 8:56 pm No need to thank me or anything... :roll:
sorry, thanks
by 777
Tue Jul 11, 2023 8:25 pm
Forum: Programming
Topic: im looking for a way to turn the bright flag on and off in assembler
Replies: 10
Views: 351

Re: im looking for a way to turn the bright flag on and off in assembler

Waldroid wrote: Tue Jul 11, 2023 8:21 pm It works here. I assembled it using pasmo and tested it in fuse.
sorry, it is working, its just hard to see the way the bright is laid out
by 777
Tue Jul 11, 2023 8:19 pm
Forum: Programming
Topic: im looking for a way to turn the bright flag on and off in assembler
Replies: 10
Views: 351

Re: im looking for a way to turn the bright flag on and off in assembler

Okay, I think this is what you're after. It makes every other character be bright. ORG 40000 CALL $daf ; Does a CLS. LD A,33 ; Stores the current character, starting at '!'. ld b,8 ; Stores ink colour. ld c,0 ; Stores paper colour. ld d,0 ; Not used. ld h,0 ; Stores bright flag on/off (1/0). LOOP: ...
by 777
Tue Jul 11, 2023 7:48 pm
Forum: Programming
Topic: im looking for a way to turn the bright flag on and off in assembler
Replies: 10
Views: 351

Re: im looking for a way to turn the bright flag on and off in assembler

Waldroid wrote: Tue Jul 11, 2023 7:45 pm I'm looking through your code... Are you trying to print a line of exclamation marks in different colours?
no. if you run it, it prints from ! to udg u across the screen in different inks and paper colours.
by 777
Tue Jul 11, 2023 6:14 pm
Forum: Programming
Topic: im looking for a way to turn the bright flag on and off in assembler
Replies: 10
Views: 351

Re: im looking for a way to turn the bright flag on and off in assembler

Waldroid wrote: Tue Jul 11, 2023 6:08 pm If you use an XOR $40 instruction to operate on each byte in the attributes it will toggle the BRIGHT bit each time it's run.
ok, i did try that but it only does 1 loop. where do i put it?
by 777
Tue Jul 11, 2023 5:52 pm
Forum: Programming
Topic: im looking for a way to turn the bright flag on and off in assembler
Replies: 10
Views: 351

im looking for a way to turn the bright flag on and off in assembler

my program contains a loop that changes the ink and the paper colour in assembler. here: ORG 40000 CALL $daf ;ld a,$16 ;rst 16 ;ld a,0 ;rst 16 ;ld a,0 ;rst 16 LD A,33 ld b,8 ld c,0 ld d,0 LOOP: CP 165 RET Z PUSH AF RST 16 ;ld a,8 ;rst 16 ld a,$10 rst 16 ld a,b add a,-1 rst 16 ld a,$11 rst 16 ld a,c ...
by 777
Mon Jul 10, 2023 3:36 pm
Forum: Programming
Topic: i cant get this piece of assembly to do what i want
Replies: 6
Views: 229

Re: i cant get this piece of assembly to do what i want

You also need to check if A hits 128 (CP 128), exiting the loop in that case (RET Z), if you want to print the character set only. thank you. how would i incorporate code to print to the screen without using rom calls? i have this: org 40000 LD A, 65 ; Character to print ; LD D, 1 ; Y position ; LD...
by 777
Mon Jul 10, 2023 3:09 pm
Forum: Programming
Topic: i cant get this piece of assembly to do what i want
Replies: 6
Views: 229

Re: i cant get this piece of assembly to do what i want

thanks. i had a feeling that was what the problem was...
by 777
Mon Jul 10, 2023 2:15 pm
Forum: Programming
Topic: i cant get this piece of assembly to do what i want
Replies: 6
Views: 229

i cant get this piece of assembly to do what i want

i want it to count up through the character set until it gets to the tokens. but for some reason it just print 9's.

here:

Code: Select all

org 40000
ld a,32
call $0daf
loop
inc a
rst 16
jr loop
any ideas?