Started by AMSDOS, 14:06, 29 August 10
0 Members and 1 Guest are viewing this topic.
Quote from: TFM/FS on 23:47, 29 August 10You don't have to go that far, you can start more early in the ROM (in this case RAM equals ROM, but to look at the ROM is always more secure...): Address &0006 contains: &91 - in CPC6128&7B - in CPC664&80 - in CPC464 May you should also check if it is a Plus ;-)
Quote from: CP/M User on 09:51, 30 August 10Thanks Folks, main reason I was asking was because I was having a look as the Fast Plot Routine on CPCWiki which looks great, though it wants to know this ColourMask which is an address which is different on the 664/6128 compared to the 464. Good point - the Pluses should be included, unfortunately the code doesn't say if it's different or not, I'm guessing it could be the same, though won't know for sure. Guessing that's a question for Executioner since their responcible for that routine! But yeah I eventually try both of those out to see what works best!
Quote from: Ygdrazil on 12:26, 30 August 10Actually you are not testing for the type of CPC but for what type of rom your CPC using... Differences in GA and banking mechanismes is not being tested! /Ygdrazil
Quote from: CP/M User on 14:19, 31 August 10Hmm, I seem to have hit a few issues with this - probably because I'm trying to implement this in CP/M. Initally I thought the &BB4E was some kind of Firmware, but CP/M doesn't like it one bit (seems to enjoy crashing) and unfortunately obtaining a value from &0006 gives me a result of 6! Doesn't matter which Computer is being used in CP/M it's the same value! Primarily because CP/M is using that low area in memory!
Quote from: CP/M User on 06:08, 01 September 10Sorry I should of realised that I can't do that in CP/M because it's wired up all differently With the Fast Plot the problem there is it's looking for a GRAPHICS PEN which resides in &B6A3 on a 664/6128 and at &B33A on a 464 these addresses though are AMSDOS based, just like the one which returns a value at &BB4F, though I'm not sure if that address is right or not cause I haven't seemed to get it to work. &BB4E in the Firmware Manual calls it a Text VDU Jumpblock. What I maybe able to do with that Fast Plot in CP/M though is do a GRA GET PEN which returns the result in "A" and use that for the Fast Plot routine. Okay what I found out is GRA GET PEN returns a different value - in the Accumulator is the Graphics Pen - so in Mode 1 it's 0,1,2,3. &B6A3/&B33A is different again - so in Mode 1 (and this varies from Mode to Mode), GRA PEN 1 is &F0, 2 is &0F, 3 is &FF and I'm guessing 0 is &00! From what I can tell - CP/M has kept the colour value @ &B6A3, though it doesn't utilise it.I'm thinking the only way to substitute it is to read the array and based on the values used on the array, intergrate a separate variable (at an absolute address) and have it there - so 0 for 0, 1 as &F0, 2 as &0F and 3 as &FF.
ORG &0100 ; CP/M v2.2 COM File write'fasplot2.com' myprog call &be9b defw &bc02 LD a,1 call &be9b defw &bc0e LD a,2 call &be9b defw &bc2c ld (myval),a ld de,100 ld hl,100 call fplot ld a,3 call &be9b defw &bc2c ld (myval),a ld de,101 ld hl,100 call fplot ld a,1 call &be9b defw &bc2c ld (myval),a ld de,102 ld hl,100 call fplot ret FPLOT LD A, L ;A = Lowbyte Y AND %00000111 ;isolate Bit 0..2 LD H, A ;= y MOD 8 to H XOR L ;A = Bit 3..7 of Y LD L, A ;= (Y\8)*8 to L LD C, A ;store in C LD B, &60 ;B = &C0\2 = Highbyte Screenstart\2 ADD HL, HL ;HL * 2 ADD HL, HL ;HL * 4 ADD HL, BC ;+ BC = Startaddress ADD HL, HL ;of the raster line LD A, E ;Lowbyte X to A SRL D ;calculate X\4, because RR E ;4 pixel per byte SRL E ADD HL, DE ;+ HL = Screenaddress LD C, %10001000 ;Bitmask for MODE 1 AND %00000011 ;A = X MOD 4 JR Z, NSHIFT ;-> = 0, no shiftSHIFT SRL C ;move bitmask to pixel DEC A ;loop counter JR NZ,SHIFT ;-position NSHIFT LD A, (myval) ;get color mask XOR (HL) ;XOR screenbyte AND C ;AND bitmask XOR (HL) ;XOR screenbyte LD (HL), A ;new screenbyte RET ;donemyval defb 0
Quote from: CP/M User on 12:46, 02 September 10TFM/FS wrote: Under CP/M you just make it the following way... DILD BC,&7F82OUT (C),CLD A,(&0006)LD C,&86OUT (C),CEI CP A,&xx...JR Z,cpcxxxx But be careful, this code must be located between &4000 an &FFFF. NOT below &4000! Looks good, for the most part I'm guessing that the main routine which Disables Interrupts and then Enables Interrupts will store a result into "A", so perhaps if I need to use something like that one day if I could return that result into a place in Memory (a variable I defined for example) that would be good!
Page created in 0.224 seconds with 23 queries.