| |
Oswald
Registered: Apr 2002 Posts: 5094 |
DTV programming
ok, are there any docs / tuts whatever except Jeri's frighteningly cryptic text? Someone can tell Jeri to atleast debug her docs ? (for example: it claims the dtv vic can read 4 bytes while displaying 8 pixels. hows 8bpp mode done then?)
how about collecting them on cswiki (if any)?
I have checked a dtv forum but its mainly about soldering, how can ppl be happy with their modded dtvs, when there's nothing to show off the HW capabilities? :P
Yesterday I was wondering about making a demo for the DTV, but the lack of information scared me away. On what I understand it should be possible to speed up ANY effetct ATLEAST by a 3.3x, but with clever coding one can take it to way much more.. and I havent yet taking into account the DMA& the Blitter... :P
anyone? |
|
... 20 posts hidden. Click here to view all posts.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
then what does this mean?
"I'm not sure what happens if you set SAC #$DE (source=$4000, destination=$8000)"
how does SAC #$de set source to $4000 and dest to $8000 ? atleast thats how I can interpret your sentence:) |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: then what does this mean?
"I'm not sure what happens if you set SAC #$DE (source=$4000, destination=$8000)"
how does SAC #$de set source to $4000 and dest to $8000 ? atleast thats how I can interpret your sentence:)
If you read about the SAC instruction in the segment mapper doc you can read "the high nibble is the destination, the low nibble is the source. For general use, set both to the same register".
SAC #$DD (or SAC #$AA etc...) is general use but SAC #$DC, for instance, isn't.
I have no clue what happens then because I haven't explored that yet.
For understanding which value to use as the nibbles (for setting the bank addresses) you have to look at the segment mapper doc:
Quote:I'm not sure what happens if you set SAC #$DE (source=$4000, destination=$8000)
This is incorrect btw. It should be destination = $4000 and the source = $8000 in the example using SAC #$DE.
My bad.
Anyway, I hope you understand now where those values for the SAC opcode come from. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
I knew that, but what the heck does it mean when the ACC uses reg X as SRC and reg Y as dst :D fuck the dtv forums I have to wait for admin approval of my reg before I can post anything.. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: I knew that, but what the heck does it mean when the ACC uses reg X as SRC and reg Y as dst :D fuck the dtv forums I have to wait for admin approval of my reg before I can post anything..
LDA #$00
LDX #$01
LDY #$02
SAC #$12 ; Reading from Acc gives reg 1 (=Y), writing to Acc changes reg 2 (=X)
PHA ; Read from Acc and push to stack
PLA ; pop from stack and write to Acc.
SAC #$00 ; Restore normal mapping (Acc is Acc for both read and write)
results in Acc=$00, X=$01, Y=$01... confused yet? :) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
ok so does what I thought?
SAC #$01
lda #$ff ; put $ff into reg 1
sta $ff ; put reg 0 into $ff ?
also what does the reserved regs do ? its so sad there are no free regs to use. :( different src and dst reg doesnt looks to make much sense. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote:what is the meaning at the SAC opcode of setting the virtual registers as source / destination ? LDA #$00 sets the destination virtual reg, and STA #$00 does write value of the source virtual reg?
Correct.
Quote:how about the reserved registers? is it possible to use them or are they implementing internal registers such as program counter lo / hi, stack pointer, status reg ?
Writing the reserved registers seem to lock up the DTV. Maybe they do something useful? ;)
Quote:what does the 2 bit / segment do when I set it to rom/ram mode? does $01 does work the old way when it comes to ram/rom settings?
Ah, this is pretty weird...
The $01 mapping is only applied over the lowest 64Kb of the 22-bit RAM address space (only 2 Mb in the DTV though).
This means that for example I/O and kernal is only present in segment #$02.
If you don't have segment #$02 mapped in somewhere, you can't access I/O or kernal regardless of $01.
You can have segment #$02 mapped in via any of the segment registers so you can get I/O at $1000, $5000, $9000 and $d000, even at several of those simultaneously (!).
If you map in ROM you will only see the flash in that segment, regardless of $01.
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
thanx, finally things starts make to sense :) so the virtual registers are unusable to have much effect on code performance, as there is only 3 to use as real registers :(. IRQ handler writing also becames a nightmare, as you have no idea what mapped to what, well storing and restoring the mappings might help, but actually you cannot READ what the mapping was o_O |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: Quote:what is the meaning at the SAC opcode of setting the virtual registers as source / destination ? LDA #$00 sets the destination virtual reg, and STA #$00 does write value of the source virtual reg?
I'm not sure what happens if you set SAC #$DE (source=$4000, destination=$8000) but doing a LDA *right* after a SAC actually performs the segment mapping.
LDA #$40
SAC #$DD ; Set accumulator mapping @ $4000
LDA #$04 ; Set highmem segment to $100000 (%xx0[b]00001 00[/b]000000 00000000)
LDA #$12
STA $4000 ; Writing in high memory now
SAC #$00 ; Accumulator is 'normal' again; filled with #$40
Tlr, Streetuff? Am I right about this?
Nope, reg D always sets the mapping of $4000, not just the following instruction.
The LDA #$12 will also end up in reg D overriding the LDA #$04.
This sets the mapping to $048000 instead of $010000.
|
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: thanx, finally things starts make to sense :) so the virtual registers are unusable to have much effect on code performance, as there is only 3 to use as real registers :(. IRQ handler writing also becames a nightmare, as you have no idea what mapped to what, well storing and restoring the mappings might help, but actually you cannot READ what the mapping was o_O
You can probably make use of the Accumulator source/dest mapping for something cool.
Also, if you don't use stack inside a code segment you can use reg 11 freely.
If you don't use zp you can use reg 10.
You can even use the segment register for a bank you don't use in that routine.
I agree about IRQ handlers. It will be tricky to run code with remapped registers that you want to be interrupted. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
more questions:
does the dma/blitter/dtv vic steal cycles from the emulated cpu when everything is set into 'native' mode? there's a bit to turn off bad line cycle stealing, how about the sprites ? |
Previous - 1 | 2 | 3 - Next |