AYe AYe...

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: AYe AYe...

Post by Paul »

Hi Moggy
It's designed for real Hardware. The port adresses can be poked just in case it is different than on real Zon-X. Any Problem?
In theory, there is no difference between theory and practice. But, in practice, there is.
Moggy
Posts: 3496
Joined: Wed Jun 18, 2008 2:00 pm

Re: AYe AYe...

Post by Moggy »

Paul wrote:Hi Moggy
It's designed for real Hardware. The port adresses can be poked just in case it is different than on real Zon-X. Any Problem?
Hi Paul thanks for quick reply :D
Could You give a quick rundown of what to put into zeddy to make it play, a set of simple instructions for a non programmer like Myself. I found one error already in the instructions for midi2ay IE. command line.. midi2ay.exe test.bin midifile.mid should be midi2ay.exe MIDIFILE.MID TEST.BIN!! I am a musician Paul not a Techie so something really simple for an old fool would be greatly appreciated. I can then start converting the 1000's of midi files I Have :lol:

Regards My Friend
Moggy
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
Moggy
Posts: 3496
Joined: Wed Jun 18, 2008 2:00 pm

Re: AYe AYe...

Post by Moggy »

EUREKA!!!


Right the beer is taking effect :lol:

1) load zx81-ay.p into the zeddy (drop the "-" as the Expand doesn't like it)

2) Enter LOAD "WI64.BIN;32768" (or whatever Midi file You have converted)

3) Real Zonx users poke 16555,207 poke 16559,31

4) Enter GOTO 1

5) ENJOY!!!!

THANNNNKKKUUUUUUUU Paul :D :D :D

A very greatfull Moggy
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: AYe AYe...

Post by Paul »

Edited as I just saw you found the answer.

I forgot, the BIN file cannot be played repeated as the player uses the length as a counter. You have to reload the BIN every time you want to play.

Hi Moggy,
to be honest I did not try up to now, I have no AY yet.

Anyway it seems you managed to convert a midi file.
I translate a bit for you as good as I can and I try to convert our German-USB stuff to ZXPAND. There may be syntax errors in what I post because I cannot test at the moment.
Here we go:
once you crated a .bin file with midi2ay you copy it to a sd-card.
Then you load it into ZX81 at address 32768 by
LOAD"TEST.BIN;32768"
then we load ZX81-AY by LOAD"ZX81-AY"
The Assembler source is found in A$ (for ASDIS)
Depending on your AY-Device you can change the outputports in REG(Register) and PRT(Port).
For those who prefer to poke:
oiginal ZonX: Poke 16555, 207 und Poke 16559,31
manipulated ZonX (without A4?): Poke 16555,223 and Poke 16559,15.
Start the progam with GOTO 1
Have fun :!:
There is also a PDF descirbing what it does (for Programmers I suppose). I will read, translate and post this tomorrow.
In theory, there is no difference between theory and practice. But, in practice, there is.
Moggy
Posts: 3496
Joined: Wed Jun 18, 2008 2:00 pm

Re: AYe AYe...

Post by Moggy »

On a serious note
This simple player developed by The German Team is ,from a musicians point of view , a good working compromise, it is easy to develop simple MIDI compositions on a good PC based sequencer then use midi2ay to convert said compositions for use on the Zeddy via this player,
I applaud Your efforts Gentlemen.

Charlie it might be worth looking at this player to see what could be learned from it.

Right beer to be drunk Files to be converted it's going to be a long night :lol: :lol: :lol:

Many many thanks again Paul this really does work :D


Regards Moggy
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: AYe AYe...

Post by Paul »

Moggy wrote:On a serious note
This simple player developed by The German Team is ,from a musicians point of view , a good working compromise, it is easy to develop simple MIDI compositions on a good PC based sequencer then use midi2ay to convert said compositions for use on the Zeddy via this player,
I applaud Your efforts Gentlemen.

Charlie it might be worth looking at this player to see what could be learned from it.

Right beer to be drunk Files to be converted it's going to be a long night :lol: :lol: :lol:

Many many thanks again Paul this really does work :D


Regards Moggy
I only gave the link. we have to thank Joachim for "generalizing" the player and please do not forget Kelly Abrantes Murta ( http://zx81.eu5.org/toddysofte.html) who has written the original Program "pink panther"
Their work is to be praised, not mine.
In theory, there is no difference between theory and practice. But, in practice, there is.
sirmorris
Posts: 2812
Joined: Thu May 08, 2008 5:45 pm

Re: AYe AYe...

Post by sirmorris »

Well the ZXpand-AY is built! I've fixed a couple of bloopers and the machine boots. But no sound, yet..!

I need to get the analyser on it, but there are very few connections to the chip, therefore very little to go wrong ;¬)

Famous last words I know, I'll keep you posted. It's late and there's no beer :shock: :cry:
Moggy
Posts: 3496
Joined: Wed Jun 18, 2008 2:00 pm

Re: AYe AYe...

Post by Moggy »

sirmorris wrote:Well the ZXpand-AY is built! I've fixed a couple of bloopers and the machine boots. But no sound, yet..!

I need to get the analyser on it, but there are very few connections to the chip, therefore very little to go wrong ;¬)

Famous last words I know, I'll keep you posted. It's late and there's no beer :shock: :cry:

NO BEER ,BLOODY LIGHTWEIGHT :lol: :lol: :lol:

Keep at it Charlie like the Xpand I get a good feeling about this one ;)

Paul I indeed thank all those whose efforts made this possible, Joachim, Kmurta well done Guys :D

After some playing around I have found that the midi files need some work , IE what key in relation to the Zonx , which instruments to use for a good interpretation etc, and most importantly the ay file must only be upto about 16 K in length any bigger then CRASH!!

Here's one to be going on with for use on real Zonx the theme from the 1960's Addams Family TV Show.

Regards Moggy
Attachments
addams.rar
(2.14 KiB) Downloaded 220 times
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
User avatar
kmurta
Posts: 323
Joined: Tue Sep 01, 2009 5:04 am
Location: Belo Horizonte - BR
Contact:

Re: AYe AYe...

Post by kmurta »

Moggy wrote: ... what we need to know is how did Kmurta turn a spectrum tap into a zx81 p ?
Well, I used the midi2ay to generate an asm file then copy the "data notas" from this file to the zx81 player asm file, then compile it to a p file. See example below.

P.S.: Excuse me for delay, but only now i read this post


Code: Select all

#define db .byte      ; TASM cross-assembler definitions
#define dw .word
#define ds .block
#define org .org
#define equ .equ
#define end .end

        org     $4009

;= System variables ============================================

VERSN:  db      0
E_PPC:  dw      0               ; BASIC line number of line with cursor.
D_FILE: dw      dfile
DF_CC:  dw      dfile+1
VARS:   dw      var
DEST:   dw      0
E_LINE: dw      var+1
CH_ADD: dw      last-1
X_PTR:  dw      0
STKBOT: dw      last
STKEND: dw      last
BERG:   db      0
MEM:    dw      membot
SPARE1: db      0               ; not used
DF_SZ:  db      2               ; Number of lines in lower part of screen.
S_TOP:  dw      10              ; BASIC line number of line at top of screen.
LAST_K: db      $ff,$ff,$ff
MARGIN: db      55
NXTLIN: dw      line1           ; Memory address of next program line to be executed.
OLDPPC: dw      0
FLAGX:  db      0
STRLEN: dw      0
T_ADDR: dw      $0c8c
SEED:   dw      0
FRAMES: dw      $ffff
COORDS: db      0,0
PR_CC:  db      $bc
S_POSN: db      33,24
CDFLAG: db      %01000000       ;
        ds      33              ;Print buffer
membot: ds      30              ;Calculator?s memory area
SPARE2: ds      2               ;not used

;= First BASIC line, asm code ==================================

line0:  db      0,0             ;line number
        dw      line1-$-2       ;line length
        db      $ea		;REM
        db      $76,$76

;-------------------------------------------------------------------------------------------

inicio:	ld	ix,rsi
	ret

rsi:	ld	a,r		;normal screen
	ld	bc,$1901
	ld	a,$f5
	call	$02b5		;process Dfile
	call	$0292		;return to user application
	call	$0220		;VSYNC

	ld	hl,(pos)
bucle:	ld	a,(hl)
	or	a
	jr	nz,finrsi
	inc	hl
	ld	a,(hl)
	cp	$ff
	jr	z,fin
	cp	$fe
	jr	z,salta
	out	($df),a
	inc	hl
	ld	a,(hl)
	out	($0f),a
	inc	hl
	jr	bucle

finrsi:	ld	(pos),hl
	dec	a
	ld	(hl),a
	ld	ix,rsi		;interruption handler address
	jp	$02a4		;return to user application

salta:	inc	hl
	inc	hl
	ld	(pos),hl
	ld	ix,rsi		;interruption handler address
fin:	jp	$02a4		;return to user application


pos:	dw	notas

; To use this:
; 1. Use Midi2ay to convert a .mid file and output it as an asm file:
;       midi2ay.exe -asm file.mid file.asm
; 2. Replace data at AY data block below with the notas from the asm file generated by midi2ay
; 3. Compile this code with TASM to generate a p file.
;


;- AY data block ---------------------------------------------------------------------------

notas:

	db	000h, 007h, 038h, 000h, 008h, 000h, 000h, 009h, 000h
	db	000h, 010h, 000h, 000h, 000h, 0fch, 000h, 001h, 000h
	db	000h, 008h, 00fh, 019h, 000h, 07eh, 000h, 002h, 0fch
	db	000h, 003h, 000h, 00dh, 000h, 0a8h, 000h, 002h, 07eh
	db	000h, 004h, 0fch, 000h, 005h, 000h, 019h, 000h, 0fch
	db	000h, 002h, 0a8h, 000h, 004h, 07eh, 019h, 000h, 08dh
	db	000h, 002h, 0fch, 000h, 004h, 0a8h, 019h, 000h, 0fch
	db	000h, 002h, 08dh, 000h, 004h, 0fch, 00dh, 000h, 0bdh
	db	000h, 002h, 0fch, 000h, 004h, 08dh, 019h, 002h, 0bdh
	db	000h, 004h, 0fch, 019h, 000h, 08dh, 000h, 002h, 0a8h
	db	000h, 009h, 00fh, 000h, 004h, 0bdh, 019h, 000h, 0fch
	db	000h, 002h, 08dh, 000h, 009h, 000h, 000h, 004h, 0a8h
	db	00dh, 002h, 0fch, 000h, 004h, 08dh, 00dh, 000h, 07eh
	db	000h, 002h, 0a8h, 000h, 009h, 00fh, 000h, 004h, 0fch
	db	00dh, 008h, 000h, 000h, 009h, 000h, 00dh, 008h, 00fh
	db	000h, 009h, 00fh, 000h, 004h, 07eh, 019h, 000h, 0fch
	db	000h, 002h, 07eh, 000h, 009h, 000h, 000h, 004h, 0a8h
	db	00dh, 000h, 08dh, 000h, 002h, 0a8h, 000h, 009h, 00fh
	db	000h, 004h, 0fch, 00dh, 008h, 000h, 000h, 009h, 000h
	db	00dh, 008h, 00fh, 000h, 002h, 0bdh, 000h, 009h, 00fh
	db	000h, 004h, 08dh, 00dh, 008h, 000h, 000h, 009h, 000h
	db	00dh, 000h, 096h, 000h, 008h, 00fh, 000h, 009h, 00fh
	db	00dh, 008h, 000h, 000h, 009h, 000h, 00dh, 000h, 0fch
	db	000h, 008h, 00fh, 000h, 002h, 096h, 000h, 004h, 0bdh
	db	00dh, 000h, 0a8h, 000h, 001h, 001h, 000h, 002h, 0fch
	db	000h, 004h, 096h, 003h, 002h, 0a8h, 000h, 003h, 001h
	db	000h, 004h, 0fch, 003h, 004h, 0a8h, 000h, 005h, 001h
	db	013h, 000h, 0f8h, 00dh, 000h, 0fch, 000h, 001h, 000h
	db	000h, 002h, 050h, 000h, 009h, 00fh, 000h, 004h, 0f8h
	db	00dh, 008h, 000h, 000h, 009h, 000h, 00dh, 008h, 00fh
	db	000h, 009h, 00fh, 000h, 004h, 0fch, 000h, 005h, 000h
	db	00dh, 008h, 000h, 000h, 009h, 000h, 026h, 000h, 0a8h
	db	000h, 008h, 00fh, 000h, 002h, 0d4h, 000h, 003h, 000h
	db	000h, 009h, 00fh, 000h, 004h, 01bh, 000h, 005h, 001h
	db	000h, 00ah, 00fh, 019h, 004h, 0fch, 000h, 005h, 000h
	db	00dh, 004h, 01bh, 000h, 005h, 001h, 00dh, 004h, 0fch
	db	000h, 005h, 000h, 00dh, 004h, 01bh, 000h, 005h, 001h
	db	026h, 000h, 096h, 000h, 002h, 0bdh, 000h, 004h, 0a8h
	db	00dh, 000h, 0f8h, 000h, 001h, 001h, 000h, 002h, 096h
	db	000h, 009h, 000h, 000h, 004h, 0bdh, 000h, 005h, 000h
	db	000h, 00ah, 000h, 00dh, 000h, 096h, 000h, 001h, 000h
	db	000h, 002h, 0bdh, 000h, 009h, 00fh, 000h, 004h, 0fch
	db	000h, 00ah, 00fh, 00dh, 004h, 096h, 000h, 00ah, 000h
	db	00dh, 004h, 0fch, 000h, 00ah, 00fh, 00dh, 004h, 096h
	db	000h, 00ah, 000h, 019h, 000h, 0a8h, 000h, 002h, 0d4h
	db	002h, 004h, 0a8h, 00bh, 000h, 0fch, 000h, 002h, 0a8h
	db	000h, 009h, 000h, 000h, 004h, 0d4h, 003h, 002h, 0fch
	db	000h, 004h, 0a8h, 003h, 004h, 0fch, 006h, 002h, 0f8h
	db	000h, 003h, 001h, 000h, 009h, 00fh, 00dh, 002h, 0fch
	db	000h, 003h, 000h, 000h, 004h, 050h, 000h, 005h, 001h
	db	000h, 00ah, 00fh, 00dh, 009h, 000h, 000h, 004h, 0fch
	db	000h, 005h, 000h, 000h, 00ah, 000h, 00dh, 009h, 00fh
	db	000h, 004h, 050h, 000h, 005h, 001h, 000h, 00ah, 00fh
	db	00dh, 009h, 000h, 000h, 004h, 0fch, 000h, 005h, 000h
	db	000h, 00ah, 000h, 00dh, 002h, 0f8h, 000h, 003h, 001h
	db	000h, 009h, 00fh, 00dh, 002h, 0a8h, 019h, 008h, 000h
	db	000h, 009h, 000h, 000h, 0ffh, 000h


;- end of AY data block --------------------------------------------------------------------

        db      $76              ;N/L (end of line 0)


line1:
        db      0,1                         ; line number
        dw      dfile-$-2                   ; line length
        db      $f9,$d4,$c5                 ; RAND USR VAL
        db      $0b,$1d,$22,$21,$1d,$20,$0b ; "16514"
        db      $76                         ; N/L


;- Display file --------------------------------------------

dfile:  db      $76
        db      $76,$76,$76,$76,$76,$76,$76,$76
        db      $76,$76,$76,$76,$76,$76,$76,$76
        db      $76,$76,$76,$76,$76,$76,$76,$76

;- BASIC-Variables ----------------------------------------

var:    db      $80

;- End of program area ----------------------------

last:

        end
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
User avatar
Paul
Posts: 1604
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: AYe AYe...

Post by Paul »

Paul wrote:There is also a PDF descirbing what it does (for Programmers I suppose). I will read, translate and post this tomorrow.
As promised:

The PDF should have appeared here, if pdf had been allowed. As doc and pdf are both not allowed (why?) I can only send it via email on request.

I have translated most parts to english. Feel free to enhance/correct the document to your needs. I can send the word document on request
In theory, there is no difference between theory and practice. But, in practice, there is.
Post Reply