Search found 206 matches

by Art
Thu Apr 04, 2024 10:39 pm
Forum: Programming
Topic: Euclidean dist/Sqrt/Multiplication routines 16bit
Replies: 38
Views: 900

Re: Euclidean dist/Sqrt/Multiplication routines 16bit

Thank you, I understand. Yes, I didn't know what << meant. Several years ago, I made a 3D vector game in Z80 assembly with coloured non-transparent city buildings, so I needed to sort them according to their distances from the player "camera". It works well on the Spectrum, but I always lo...
by Art
Thu Apr 04, 2024 10:10 pm
Forum: Programming
Topic: Euclidean dist/Sqrt/Multiplication routines 16bit
Replies: 38
Views: 900

Re: Euclidean dist/Sqrt/Multiplication routines 16bit

Found this which has more terms of the approximation. https://www.flipcode.com/archives/Fast_Approximate_Distance_Functions.shtml u32 approx_distance( s32 dx, s32 dy ) { u32 min, max; if ( dx < 0 ) dx = -dx; if ( dy < 0 ) dy = -dy; if ( dx < dy ) { min = dx; max = dy; } else { min = dy; max = dx; }...
by Art
Wed Mar 06, 2024 1:33 pm
Forum: Games/Software
Topic: In game beeper music
Replies: 43
Views: 1750

Re: In game beeper music

Snakes & Hazards, Xmas Ludo, Shove-a-Sledge, Tiddly Drinks. On Spectrum 48K, it plays music through the beeper.
✓ Reviewed
by Art
Sun Feb 04, 2024 6:24 pm
Forum: Games/Software
Topic: In game beeper music
Replies: 43
Views: 1750

Re: In game beeper music

Gilligan's Gold
✓ Reviewed
by Art
Mon Dec 04, 2023 6:59 pm
Forum: Brand new software!
Topic: Aztec
Replies: 51
Views: 2280

Re: Aztec

Was this game finished? I tried the version from this archive and it shows some flickering during the gameplay.
by Art
Sat Oct 21, 2023 11:36 pm
Forum: Hardware
Topic: MicroMIDI etc.
Replies: 0
Views: 64

MicroMIDI etc.

I have found some articles from 1982-1985 about Spectrum musical hardware and software. I am not sure if all this is in the database, probably only XRI Micon and its Step Time Sequencer. http://www.muzines.co.uk/articles/micromidi/6021 http://www.muzines.co.uk/articles/micro-music/4409 http://www.mu...
by Art
Tue Jun 06, 2023 7:21 pm
Forum: Other Retro Stuff
Topic: Are amiga games bad?
Replies: 77
Views: 2249

Re: Are amiga games bad?

When I saw my friend's Amiga 500 in 1989, I really liked it. The graphic operating system looked cute and some games with 32 colours and stereo music were very atmospheric. Only the case design and the flickering white booting screen with 50 Hz didn't look great, but comparing to my Spectrum +2 it w...
by Art
Tue Mar 28, 2023 4:17 pm
Forum: Games/Software
Topic: Game of the day...
Replies: 600
Views: 98413

Re: Game of the day...

I always liked Booty, but I must agree with your frustration points. I would appreciate if someone could find POKEs for: Much bigger time limit to find the last key. To move the point of collection of an item to its centre. Better detection for moving platforms. Now it's too easy to fall down throug...
by Art
Mon Mar 20, 2023 2:13 pm
Forum: Website
Topic: ZXDB Update - 16 March 2023
Replies: 13
Views: 369

Re: ZXDB Update - 16 March 2023

BASIC Interactive Assembler System - the file BASICInteractiveAssemblerSystem(EN).txt.zip can't be downloaded. By the way, this system looks very good for learning assembler. The user can write an assembler source code directly in the normal Spectrum Basic program, so he can combine both types and t...
by Art
Tue Nov 15, 2022 7:32 pm
Forum: Brand new software!
Topic: The Next Hacker
Replies: 2
Views: 282

The Next Hacker

I've noticed an interesting looking new Spectrum game:
https://www.youtube.com/watch?v=7LMrndvxwPI
Below the video, there is also a link to download the game.
by Art
Wed Oct 19, 2022 10:22 pm
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Re: Data corruption below 25000

Put breakpoint in emulator on write to desired memory area. Then you can find what code does corruption. Yes, exactly. That's how I found the bug. But I was doing it in Fuse, so it was more difficult. I don't know if the Fuse debugger doesn't have an option for a memory range breakpoint, but I didn...
by Art
Wed Oct 19, 2022 9:17 pm
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Re: Data corruption below 25000

I was also thinking about showing it, but finally I found a bug. It's my first assembler project using sprites, so I made a lot of mistakes and rewrote almost everything several times. This time I was using LDI for drawing on the right screen edge and I forgot that when the address crosses the scree...
by Art
Wed Oct 19, 2022 5:14 pm
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Re: Data corruption below 25000

If you haven't seen it, my Speccy Z80 handbook has a brief section on interrupts: http://railtron.com/files/spectrum/ZX-Z80.pdf It also tells you how to scan the keyboard, since the ROM interrupt will no longer be doing that for you. A nice handbook, thanks! First up, disable interrupts with DI . N...
by Art
Wed Oct 19, 2022 5:07 pm
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Re: Data corruption below 25000

R-Tape wrote: Wed Oct 19, 2022 1:17 pm I know it's a 48K program, but are you testing it in 48K emulation? If you're emulating +2A or +3, even in 48K mode that bit of RAM is used when tape loading (or something).
Yes, I am testing it in 48K emulation, but it's good to know it about +2A and +3, thanks.
by Art
Wed Oct 19, 2022 12:56 pm
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Re: Data corruption below 25000

While you may not use any ROM routines in your code, the interrupt will still be running and that might affect the Sys Vars that are placed not much below 24000. To be absolutely sure that you can use the Sys Var area for your own purposes, you should either have interrupts disabled ALL the time OR...
by Art
Wed Oct 19, 2022 12:51 pm
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Re: Data corruption below 25000

No idea about the corruption, but there's something weird going on. If you've done DI then that HALT should just freeze forever. It'll never come out of it if interrupts aren't on. If interrupts are on though you'll have to be careful as the ROM routines assume IY is always the same and uses it to ...
by Art
Wed Oct 19, 2022 11:53 am
Forum: Programming
Topic: Data corruption below 25000
Replies: 16
Views: 404

Data corruption below 25000

I am trying to make a program in assembler with a lot of graphics, so I would like to use all available Spectrum 48K memory. When my program block starts at the address 25000, everyting is OK. When I move it to 24000, it starts normally, but after some time it gets corrupted in the area between 2400...
by Art
Wed Mar 02, 2022 7:51 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Re: Fast compare to multiple numbers in assembler

catmeows wrote: Wed Mar 02, 2022 5:11 pm Or AND(HL) and use $FF for jump and $00 for skip.
Do you mean "and (hl)" instead of "ld a,(hl): and a" ? But what if a=0 ? Then I think the result would be 0 in any case.
by Art
Wed Mar 02, 2022 7:43 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Re: Fast compare to multiple numbers in assembler

Ast A. Moore wrote: Wed Mar 02, 2022 7:37 pm Why not use CPI/CPIR?
I was also thining about it, but when I made a test, it looked more complicated than before. But maybe I just didn't understand how it should be done.
by Art
Wed Mar 02, 2022 7:41 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Re: Fast compare to multiple numbers in assembler

Thank you, I understand. I don't know why, but it took me some time to understand the idea.
by Art
Wed Mar 02, 2022 6:12 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Re: Fast compare to multiple numbers in assembler

I was also thinking about a table, but wouldn't it be slower than my example? The table will only do one check - it will go straight to the answer it needs. It might not be quicker than the first check in your example, but by the time you're doing a third or fourth comparison against the same initi...
by Art
Wed Mar 02, 2022 5:50 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Re: Fast compare to multiple numbers in assembler

Though it would be better to have codes in continuing range and resolve jump by one or two conditional branches. For example it is useless to test '45' when you can test 'less than 44' and 'more than 46'. You can also look on binary search : one can resolve any value between 0 and 255 by 8 tests on...
by Art
Wed Mar 02, 2022 5:43 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Re: Fast compare to multiple numbers in assembler

Pobulous wrote: Wed Mar 02, 2022 4:25 pm You could use a lookup table aligned on 256 byte boundary
Values of 1 for jump or zero to not jump

LD H, (base of table)
LD L, number to compare
LD A,(HL)
AND A
JP NZ, address
I was also thinking about a table, but wouldn't it be slower than my example?
by Art
Wed Mar 02, 2022 4:14 pm
Forum: Programming
Topic: Fast compare to multiple numbers in assembler
Replies: 14
Views: 481

Fast compare to multiple numbers in assembler

Is it possible to speed up this type of code? If a number in a register is equal to any of these numbers, the program jumps to an address. The address is the same for all tests.

Code: Select all

cp 20
jp z,address
cp 21
jp z,address
cp 44
jp z,address
cp 45
jp z,address
cp 46
jp z,address
...
by Art
Fri Feb 25, 2022 8:59 am
Forum: Preservation
Topic: uMIA titles from Science & Vie
Replies: 2
Views: 180

Re: uMIA titles from Science & Vie

Raoh_hokuto_shinken wrote: Thu Feb 24, 2022 5:51 pm Corn-Hunter (with Jean-Michel Jarre intro music "Popcorn"):
Image
It's quite interesting to hear pseudo-multichannel music from an old Basic magazine type-in. By the way, Popcorn wasn't made by Jarre.