Tuesday, August 15, 2017

CSpect V0.5

Will just say.... These are all subject to change. Looks like HLDE will swap to DEHL to help compilers, and ACC32 changes to A32. So be aware when using.

Okay, this this (might) be the last one for a little - I really want to carry on with my game, and not get drawn into doing emulators and assemblers all the time!


There are also several new Z80 opcodes to play with! My included assembler will assemble these correctly for use in the emulator. There are a few more to come.....

   swapnib           ED 23           A bits 7-4 swap with A bits 3-0
   mul               ED 30           multiply HL*DE = HLDE (no flags set)
   add  hl,a         ED 31           Add A to HL (no flags set)
   add  de,a         ED 32           Add A to DE (no flags set)
   add  bc,a         ED 33           Add A to BC (no flags set)
   add  hl,$0000     ED 34 LO HI     Add A to HL (no flags set)
   add  de,$0000     ED 35 LO HI     Add A to DE (no flags set)
   add  bc,$0000     ED 36 LO HI     Add A to BC (no flags set)
   outinb            ED 90           out (c),(hl), hl++
   ldix              ED A4           As LDI,  but if byte==A does not copy
   ldirx             ED B4           As LDIR, but if byte==A does not copy
   lddx              ED AC           As LDD,  but if byte==A does not copy, and DE is incremented
   lddrx             ED BC           As LDDR,  but if byte==A does not copy
   fillde            ED B5           Using A fill from DE for BC bytes
   ld  hl,sp         ED 25           transfer SP to HL
   ld  acc32,hlde    ED 20           transfer HLDE into ACC32
   ld  hlde,acc32    ED 21           transfer ACC32 into HLDE
   ex  acc32,hlde    ED 22           swap ACC32 with HLDE
   inc hlde          ED 37           increment 32bit HLDE
   dec hlde          ED 38           increment 32bit HLDE
   add hlde,a        ED 39           Add A to 32bit HLDE
   add hlde,bc       ED 3A           Add BC to 32bit HLDE
   add hlde,$0000    ED 3B LO HI     Add $0000 to 32bit HLDE
   sub hlde,a        ED 3C           Subtract A from 32bit HLDE
   sub hlde,bc       ED 3D           Subtract BC from 32bit HLDE
   mirror a          ED 24           mirror the bits in A     
   mirror de         ED 26           mirror the bits in DE     
   push $0000        ED 8A LO HI     push 16bit immidiate value
   popx              ED 8B           pop value and disguard
   nextreg reg,val   ED 91 reg,val   Set a NEXT register (like doing out($243b),reg then out($253b),val )
   nextreg reg,a     ED 92 reg       Set a NEXT register using A (like doing out($243b),reg then out($253b),A )
   pixeldn           ED 93           Move down a line on the ULA screen
   pixelad           ED 94           using D,E (as Y,X) calculate the ULA screen address and store in HL
   setae             ED 95           Using the lower 3 bits of E (X coordinate), set the correct bit value in A

Download: CSpect Emulator

No comments: