RE: Short, short questions

2008-05-21 Thread Adrian Brown
2008 06:46 To: sam-users@nvg.ntnu.no Subject: Re: Short, short questions I thought the idea of mode2 was you could have different vectors for different devices connected well this throws a spanner in the works. But then again is there any hardware for the SAM that uses them? I think it must have

RE: Short, short questions

2008-05-21 Thread Geoff Winkless
Sent: 21 May 2008 06:46 To: sam-users@nvg.ntnu.no Subject: Re: Short, short questions I thought the idea of mode2 was you could have different vectors for different devices connected well this throws a spanner in the works. But then again is there any hardware for the SAM that uses them? I

Re: Short, short questions

2008-05-21 Thread Colin Piggot
Adrian Brown wrote: Ok, i haven't read all the posts on this, but why not stick the code in LMPR and use IM1 - saves having the table of vectors. That's my favoured approach too. ** UIP Sam Port 4100+ lines of z80 and climbing Woo! It's so tantilisingly close! David Brant wrote: But then

RE: Short, short questions

2008-05-21 Thread Adrian Brown
Has to be said the first thing my code does is page itself into LMPR addr 0 and sit there :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geoff Winkless Sent: 21 May 2008 14:46 To: Adrian Subject: RE: Short, short questions I have to admit I

Re: Short, short questions

2008-05-21 Thread Andrew Collier
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Brant Sent: 21 May 2008 06:46 To: sam-users@nvg.ntnu.no Subject: Re: Short, short questions I thought the idea of mode2 was you could have different vectors for different devices

Re: Short, short questions

2008-05-21 Thread Thomas Harte
the table of vectors. Adrian ** UIP Sam Port 4100+ lines of z80 and climbing -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Brant Sent: 21 May 2008 06:46 To: sam-users@nvg.ntnu.no Subject: Re: Short, short questions I thought

Re: Short, short questions

2008-05-21 Thread Thomas Harte
Really it was related to my first question - I was considering the plausability of moving my data table to be positioned around address zero when I wrote the post. And obviously a table that reaches 2kb in either direction from address 0 covers address 0x0038. Tests last night with an older,

Re: Short, short questions

2008-05-21 Thread Colin Piggot
Andrew Collier wrote: If I used IM1 this would require that either, a) the screen goes in sections A and B, and the interrupt routine is actuially visible in pixels - or b) the moveable window goes in sections A and B, and I have to duplicate the interrupt routine in nearly every page of

Re: Short, short questions

2008-05-21 Thread Geoff Winkless
On Wed, 21 May 2008 15:29:28 +0100, Colin Piggot [EMAIL PROTECTED] wrote: Andrew Collier wrote: If I used IM1 this would require that either, a) the screen goes in sections A and B, and the interrupt routine is actuially visible in pixels - or b) the moveable window goes in sections A and B,

Re: Short, short questions

2008-05-21 Thread Andrew Collier
On Wed, May 21, 2008 at 03:16:07PM +0100, Thomas Harte wrote: If you interrupt routine is small, could you not also just switch off the first one or two scanlines of your display, and even grab a few extra cycles out as a result? Or can you not enable and disable the display per scanline? Hi,

Re: Short, short questions

2008-05-21 Thread Thomas Harte
Literally anything? On many of the machines I have written emulators for, most things are usually completely changeable but some things are loaded internally — especially on any machine that has a variable screen start address. Also, one further question: am I right to think that the Sam has no

Re: Short, short questions

2008-05-21 Thread Colin Piggot
Thomas Harte wrote: Literally anything? On many of the machines I have written emulators for, most things are usually completely changeable but some things are loaded internally — especially on any machine that has a variable screen start address. Not literally anything, you can change the

Re: Short, short questions

2008-05-21 Thread Andrew Collier
Hi, Well - at least, any of the things you can ever change, yes! screen on/off, border colour, palette, screen mode, ram page, etc. Early versions of SimCoupe didn't support these changes better than once per line. I remember Allan (or was it Simon?) telling me he had never realised that the

Re: Short, short questions

2008-05-21 Thread Geoff Winkless
On Wed, 21 May 2008 17:09:32 +0100, Andrew Collier [EMAIL PROTECTED] wrote: Correct. Always non-interlaced (despite various examples on Fred of flickery pictures which purported otherwise). While (on a TV with 576 visible lines) you won't be able to get a 192 line output device to output

Re: Short, short questions

2008-05-21 Thread Thomas Harte
But Sim Coupe duplicates all known characteristics of the real hardware now, right? I was actually involved in writing emualtors as early as 1998, and most of the early ones were horrible. Pretty much anything by Marat Fayzulin or derived from his source still is — they're usually run the CPU for

Re: Short, short questions

2008-05-21 Thread Andrew Collier
On Wed, May 21, 2008 at 05:28:58PM +0100, Thomas Harte wrote: But Sim Coupe duplicates all known characteristics of the real hardware now, right? All the ones that I know about, certainly. Even the little ASIC quirks like single-pixel vertical lines in the border (this is something Simon Cooke

Short, short questions

2008-05-20 Thread Thomas Harte
I'm about to finish my lunch break, sorry if I sound slightly short... 1) is there any pattern or logic to the values placed on the bus during interrupts? I guess an equivalent question is: what realistic options do I have on the Sam for catching and processing interrupts? 2) are there any

Re: Short, short questions

2008-05-20 Thread Andrew Collier
On Tue, May 20, 2008 at 02:03:57PM +0100, Thomas Harte wrote: I'm about to finish my lunch break, sorry if I sound slightly short... 1) is there any pattern or logic to the values placed on the bus during interrupts? I guess an equivalent question is: what realistic options do I have on the

Re: Short, short questions

2008-05-20 Thread Andrew Collier
On Tue, May 20, 2008 at 03:22:54PM +0100, Andrew Collier wrote: correction: ld a,h 4 sla l 8 rla4 add table/256 8 ld h,a 4 = 28 You can also shave a little more time if you're willing to rearrange the table: Instead of word pairs (low

Re: Short, short questions

2008-05-20 Thread Thomas Harte
While thinking about it during the afternoon, I have decided that since this table is absolutely fundamental to my program (it's part of the table based 2.8x2.8 multiply), I'm just going to centre it on address 0. Then I can cut the ld bc and the add hl, bc. I'm happy to rearrange my

Re: Short, short questions

2008-05-20 Thread Andrew Collier
On Tue, May 20, 2008 at 07:20:48PM +0100, Thomas Harte wrote: Obviously the second is faster — but I'm curious about your cycle counts. All the z80 documentation I have lists add hl, ss as 11 t- states. Why have you turned that into 16? By mistake :) I'm working from google, and misread

Re: Short, short questions

2008-05-20 Thread Edwin Blink
for the table would be 16384 (use SET 6,H), 8192 (SET 5,H), 4096 (SET 4,H) or 0 (you don't need the first SET instruction at all) Edwin - Original Message - From: Thomas Harte [EMAIL PROTECTED] To: sam-users@nvg.ntnu.no Sent: Tuesday, May 20, 2008 3:03 PM Subject: Short, short

Re: Short, short questions

2008-05-20 Thread David Brant
Subject: Re: Short, short questions The usual strategies are to use mode 1, or to use mode 2 with a 257-byte table all containing the same byte.

Re: Short, short questions

2008-05-20 Thread Thomas Harte
the first SET instruction at all) Edwin - Original Message - From: Thomas Harte [EMAIL PROTECTED] To: sam-users@nvg.ntnu.no Sent: Tuesday, May 20, 2008 3:03 PM Subject: Short, short questions I'm about to finish my lunch break, sorry if I sound slightly short... 1) is there any

Re: Short, short questions

2008-05-20 Thread Edwin Blink
From: Thomas Harte Surely set would only work if I had an unsigned offset from the beginning of a table? I'm using a signed offset from the middle of a table. it works the same as ADD HL,HL ADD HL,BC the difference is you store the table entries LSB,MSB so you need the ADD HL,HL First you

Re: Short, short questions

2008-05-20 Thread Edwin Blink
Boy Do I feel silly I missed that ADD HL,BC. Edwin - Original Message - From: Thomas Harte [EMAIL PROTECTED] To: sam-users@nvg.ntnu.no Sent: Tuesday, May 20, 2008 9:53 PM Subject: Re: Short, short questions Surely set would only work if I had an unsigned offset from

Re: Short, short questions

2008-05-20 Thread Andrew Collier
ina,(status.int) . . ei ret - Original Message - From: Andrew Collier [EMAIL PROTECTED] To: sam-users@nvg.ntnu.no Sent: Tuesday, May 20, 2008 3:22 PM Subject: Re: Short, short questions

Re: Short, short questions

2008-05-20 Thread David Brant
: Re: Short, short questions Hi, I'm sceptical about this claim. I've never heard anybody say that the vector formed is big-endian - it's just you don't know the byte offset from which the interrupt vector will be fetched. (As Edwin says, it is usually 255 - which is odd so your 1-aligned

Re: Short, short questions

2008-05-20 Thread David Brant
: David Brant [EMAIL PROTECTED] To: sam-users@nvg.ntnu.no Sent: Tuesday, May 20, 2008 10:49 PM Subject: Re: Short, short questions This was based on info from a book called z-80 Workshop manual by E.A Parr. The I register gives the high part of the table and the hardware gives the low part

Re: Short, short questions

2008-05-20 Thread Andrew Collier
Subject: Re: Short, short questions This was based on info from a book called z-80 Workshop manual by E.A Parr. The I register gives the high part of the table and the hardware gives the low part to the table then takes that word for the service routine. So if you start from one byte before

Re: Short, short questions

2008-05-20 Thread Edwin Blink
AM Subject: Re: Short, short questions I've just been looking at my books. Although I can't find the bit that said about swapping to high,low but I'm sure that I did read it somewhere. It does say that the device only gives the bits 1-7 and bit 0 is always 0 giving 128 possible addresses. Dave

Re: Short, short questions

2008-05-20 Thread David Brant
. After a little test and using old brain this is wrong. Dave - Original Message - From: Edwin Blink [EMAIL PROTECTED] To: sam-users@nvg.ntnu.no Sent: Wednesday, May 21, 2008 5:34 AM Subject: Re: Short, short questions All 8 bits are used for LSB of the vector. The part where bit 0