Thanks Martin,
Hadn't thought of counting interrupts in the ISR routine too.
Your first idea would be a simple flip/flop affair.
LD A, (ISR_FF)
INC A
AND 1
LD (ISR_FF), A
JR ????
Search found 137 matches
- 02 Nov 2017 15:33
- Forum: PROGRAMMING
- Topic: Generating a 60Hz Interrupt
- Replies: 3
- Views: 8671
- 01 Nov 2017 15:42
- Forum: PROGRAMMING
- Topic: Generating a 60Hz Interrupt
- Replies: 3
- Views: 8671
Generating a 60Hz Interrupt
Ok I've been looking into generating a 60Hz interrupt using the CTC as a large number of VGM's have been captured at this rate. I am using channel 1 for this to avoid the VDP interrupt on channel 0. So my first attempt got a 61Hz interrupt by programming the CTC in Timer mode, with a prescaler of 25...
- 20 Oct 2017 14:44
- Forum: PROGRAMMING
- Topic: Memotest 2017 - Z80 coding contest
- Replies: 27
- Views: 38123
Re: Memotest 2017 - Z80 coding contest
I've still been tinkering with my code and seen how I can get it to 37 bytes. By making ED = p xor q and moving the ADD HL,HL instructions so that the next XOR can be combined got it down to 38 bytes. Which just left shaving a byte off the p ROL a bit. Well done Tony, I can see my Z80 skills are rus...
- 19 Oct 2017 14:20
- Forum: PROGRAMMING
- Topic: Memotest 2017 - Z80 coding contest
- Replies: 27
- Views: 38123
Re: Memotest 2017 - Z80 coding contest
I know the competition is over but I've been tinkering with my code I made and just by using BC and DE as p and q, one of the points made already, I've got my code down to 44 bytes. A saving of 8 bytes.
Regards
Regards
- 16 Oct 2017 22:00
- Forum: MEMOFEST 2017
- Topic: Memofest 2017 Photos
- Replies: 13
- Views: 25530
Re: Memofest 2017 Photos
Another group photo.
- 16 Oct 2017 14:22
- Forum: PROGRAMMING
- Topic: Memotest 2017 - Z80 coding contest
- Replies: 27
- Views: 38123
Re: Memotest 2017 - Z80 coding contest
Here was my attempt at 52 bytes. CALC_PRNG ;* p := p XOR q XOR (p ROL a) XOR ((p XOR q) SHL b) ;* 1111111 1111111 ;* q := ((p XOR q) ROL c) ;* 1111111 LD A, L ; BC = DE = (HL XOR DE) XOR E ; HL = old p LD C, A LD E, A LD A, H XOR D LD B, A LD D, A ; ????????????? SWAP BC and DE USAGE ???????????????...
- 07 Oct 2017 17:55
- Forum: MEMOFEST 2017
- Topic: ROM Upgrades
- Replies: 4
- Views: 8948
Re: ROM Upgrades
Great, I'll bring my CFX.
- 25 Sep 2017 17:44
- Forum: PROGRAMMING
- Topic: Memotest 2017 - Z80 coding contest
- Replies: 27
- Views: 38123
Re: Memotest 2017 - Z80 coding contest
Is there any restriction on self modifying code?
- 18 Aug 2017 13:47
- Forum: MEMOFEST 2017
- Topic: What to DO at Memofest 2017
- Replies: 17
- Views: 23331
Re: What to DO at Memofest 2017
I should have a new game finished to show off, a conversion of a 1979 arcade game.
Just High score (which is a bitch to do), title screen and sound to do.
Is there going to be a surgery for poorly MTX's?
Just High score (which is a bitch to do), title screen and sound to do.
Is there going to be a surgery for poorly MTX's?
- 18 Aug 2017 13:42
- Forum: PROGRAMMING
- Topic: MTX BASIC / Assembly Interface
- Replies: 2
- Views: 8037
Re: MTX BASIC / Assembly Interface
For development, Memu can be used to show what blocks of data are being loaded. On a real MTX, if its loaded by Basic, then the sysvars will. Basic starts at BASBOT ($FAA7), i.e. $4000 or $8000. Basic ends at ARRTOP (includes memory for arrays) ($FACC) Noddy ends at NBTOP. ($FAA4) So size of data lo...