Jump to content

toarnold

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by toarnold

  1. Update: I tried rmac/rln. This did the trick. Now I try to find the differences. Thx, toarnold
  2. Hi friends, I get into difficulties displaying a scaled bitmap. So I take a look into the WORKSHOP/SCALE sample. I got it compiled, but the result produces a black screen. Can anybody provide me a working make file (with current tools for win32), or another working sample? I tried smac/vlink. This combination works for the MOVE sample. I checked the linking address for the scaled bitmap but it seems to be correct (dphrase aligend) Thx, toarnold
  3. Thx, I found it. I wrote JPIT1 (PreScaler) and JPIT2 (Divider) separately. This is absolute nonsense. One 32-Bit move to JPIT1 did the trick. So Timer1 can be manipulated by Jerry.
  4. I agree with you and my understanding is the same, But can you try to reproduce the error? In fact in my sample the interrupt occurs every second. So I can't believe a second interrupt occurs. The error occurs randomly between 1..30 seconds on my jag. I don't believe it is a crash, 'cause the code after the jwaitloop executed correctly. Changing the cancellation code to jwaitloop: load (r9),r25 cmpq #1,r25 ; Test cancellation Token jr ne,jwaitloop nop seems to heal the error ... I'learn, so if someone can point me the error I'll very happy . - toarnold
  5. Next dojo in starting jaguar development. I tried to figure out how to use a jerry timer. The exercise was to write a subroutine, getting a timer divider, a cancellation token, and an updateable counter. So it can be called from C: typedef void(*TimerHandler)(uint32_t time, uint32_t *cancellationToken, volatile uint32_t *count); Jerry should update the counter per interrupt until the host writes a value !=0 to the cancellationToken than Jerry has to stop. The ISR (Timer0 [interrupt 2] - remember to start ISR at D_RAM + 32) should look like (compare v8.pdf) dsp_int: load (r28),r29 ;get dsp flags bclr #3,r29 ;interrupt serviced load (r31),r30 ;get return from stack bset #11,r29 ;clear int source flag addq #4,r31 ;update stack addq #2,r30 ;update return address ; custom Code start load (r27),r26 addq #1,r26 store r26,(r27) ; custom Code end jump (r30) ;return from int store r29,(r28) ;set dsp flags The main loop in Jerry is very strait forward: jwaitloop: load (r9),r25 cmpq #0,r25 ; Test cancellation Token jr eq,jwaitloop nop First of all I find out my ISR never was executed, because I am writing the JPIT1 divider from a running Jerry. This didn't work. Set JPIT1 before starting Jerry! The second error was a little bit harder to detect. The program is running, but after a few seconds Jerry terminates himself by aborting the jwaitloop, but r25 was zero! This error can only happens if the interrupts occurs between the cmpq and the jr in the mainloop and the ISR isn't restoring the flags correctly. So I exchanged the last two line of the ISR and place a nop after the jump: store r29,(r28) ;set dsp flags jump (r30) ;return from int nop So my conclusion is. There is an error in the v8.pdf or the DSP. Under some circumstances the pipelined instruction after the jump isn't executed correctly, so the FLAGS restored wrong. Attached is my Visual Studio 2013 solution (it can build by commandline, too), so you can test by yourself - toarnold JerryTimer.zip
  6. @Seedy1812 thank you for clearifing the blitter flags. Now I find out how to override the background color (prevent destination read [NOT DSTEN] and BKGWREN) and how to invert the image (exchanging B_PATD and B_DSTD). I updated my sample, so it runs much faster. hello4.zip
  7. You are absolutly right. I forgot about this. There are a few mistakes in the jaguar.h some pointers are defined as long * but they are in real short *, like CLUT or JOYSTICK. This can cause side effects. And of course following your explanation about volatile, all pointers in jaguar.h aren't volatile, so e.g. polling JOYSTICK can lead you in the same trap. Now I updated my sample to display all fonts TXG/MNX had ripped. I had to reorder them to be near ASCII order (ATARI calls this ATASCII a few years ago) With the joystick you can flip through the fonts. With up/down you can select the inverted char mode (highBit enabled of the characters). There are a few helper methods to dump values as hex and dec, print string and chars and treat your screen like an old ATARI Graphics 0 mode So I have a usefull library to dump values for debug purpose. Have fun! toarnold hello3.zip
  8. Found a little bit spare time This is my modified source. I extracted the ATARI 8-Bit font, made a blue background, and printed a white READY on the screen Next step is to display a white block beneath the READY toarnold hello.zip
  9. Hi JagChris, I'm on a business trip until thursday. In meantime you can put the code posted above into the DrawChar function. I will post my code later. toarnold
  10. Hi ST-Oldie, thanks for the links. After study and a few trial and error I got it. But don't know why . B_CMD is strange, and A2_PIXEL don't know why 1 ... *A1_BASE = (uint32_t)jagscreen; *A1_FLAGS = PIXEL8 | XADDPIX | WID320 | PITCH1; *A1_PIXEL = (y << 16) | x; *A1_STEP = 0x010000 | (uint16_t)-8; *A2_BASE = (uint32_t)(textfont + (ch << 3)); *A2_FLAGS = PIXEL1 | XADDPIX | WID8 | PITCH1; *A2_PIXEL = 1; *A2_STEP = 0x010000 | (uint16_t)-1; *B_COUNT = 0x080008; *B_PATD = 1; *B_DSTD = 0; *B_CMD = SRCENX | UPDA1 | UPDA2 | PATDSEL | BCOMPEN | BKGWREN | DSTEN; toarnold
  11. Hi friends, Like many other Jaguar owners I got my Skunkboard last week. 'Cause I'm familar writing C and 68000 ASM code, I think the 'hello' sample is a good place to start. After reviewing the source code I thought using the blitter is a good topic to dive into the jag. Clearing the main screen was easy with the blitter, but after that I tried to copy the characters using the blitter. A char is 8x 8bit monochrome, but the screenbuffer isn't. All my attemps results in an 8x8 pixel black hole :-( Has anybody done this before? Sorry I'm writing mobile. I can post my source code this afternoon if it makes sense. toarnold
  12. I know I'm late. But I will also take one board. toarnold
×
×
  • Create New...