tap8k. simple, small and fast loader

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: tap8k. simple, small and fast loader

Post by Ast A. Moore »

antoniovillena wrote: Mon Dec 11, 2017 1:32 am
Ast A. Moore wrote: Sun Dec 10, 2017 3:18 pm I’m also quite confused. Is it compressing the data or simply puts machine code inside the BASIC loader? Because you can do both with many assemblers already.
puts machine code inside BASIC loader. What assembler do that?
zasm, for instance.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
antoniovillena
Drutt
Posts: 17
Joined: Sat Dec 09, 2017 9:07 pm

Re: tap8k. simple, small and fast loader

Post by antoniovillena »

Ast A. Moore wrote: Mon Dec 11, 2017 9:22 am zasm, for instance.
I have Windows and I can't try.
antoniovillena
Drutt
Posts: 17
Joined: Sat Dec 09, 2017 9:07 pm

Re: tap8k. simple, small and fast loader

Post by antoniovillena »

I have released a version that includes shrinkler compressor, developped here.

https://github.com/antoniovillena/zx7b/ ... /shr8k.asm

So from a input binary file assembled with org $8000 you will have a compressed TAP file like this:

https://github.com/antoniovillena/zx7b/ ... r/demo.tap
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: tap8k. simple, small and fast loader

Post by Nomad »

Has it been tested on real hardware (48k,128k,+3) Just curious because a lot of these loaders that perform seemingly fine in emulation have issues on the real thing.

I must confess I never really thought about a better loader than what zeus/pasmo gives you but fair play there appears to be scope for improvement over what the assemblers can give us. I am just concerned if it will work on real hardware.
antoniovillena
Drutt
Posts: 17
Joined: Sat Dec 09, 2017 9:07 pm

Re: tap8k. simple, small and fast loader

Post by antoniovillena »

Nomad wrote: Sat Mar 03, 2018 11:59 am I am just concerned if it will work on real hardware.
Yes. It works on real hardware.
Rorschak
Drutt
Posts: 6
Joined: Mon Nov 13, 2017 5:04 pm

Re: tap8k. simple, small and fast loader

Post by Rorschak »

The program fails if you have an interface that moves the basic. A spectrum 48K with a betadisk interface moves the basic away from 23755. You should probably check PEEK 23635+256*PEEK 23636 in order to locate the start of your code.

If you need to know where your code is executing, i use this little trick:

Code: Select all

LocateProgram:	XOR		A	; SET Z FLAG
		INC		A	; RESET Z FLAG
		CALL  		$1FC6	; THIS CALL TO THE ROM CONTAINS THESE INSTRUCTIONS. POP HL, RET Z, JP (HL). 
Mycode:		...			; AT THIS POINT, HL CONTAINS THE ADDRESS OF THIS INSTRUCTION
Post Reply