Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 6 FirstFirst ... 4 5 6
Results 126 to 135 of 135

Thread: VGA out for Teensy 4.0/4.1

  1. #126
    Member
    Join Date
    Aug 2020
    Location
    France
    Posts
    72
    Hi Jean Marc ,
    I have check your VGA driver but i have to admit ,the way it's done, it's too complex for me
    I have then test on STM32 for try to shift the screen to right , i don't have reproduce the same as we have on the teensy but it come from the H back porch + H Sync + H Front porch , when i set them to wrong value the picture move too
    If it's possible , can you try this on your timing ?
    Click image for larger version. 

Name:	vga.jpg 
Views:	29 
Size:	55.4 KB 
ID:	22429

    This timing made me a perfect 640 x 480 screen with no shifting , now for the 640 x 400 the horizontal timing stay the same , only the vertical one change because they are less line to show.

    Cheers.

  2. #127
    Senior Member
    Join Date
    May 2018
    Posts
    197
    Hi,

    According to your drawing,
    back_porch = 800-756= 44
    and front_porch = 660-640 = 20

    So in the lib do:

    #define frontporch_pix 20 //16
    #define backporch_pix 44 //48

    Does it resolve your problem?

    Regards,

    J-M

  3. #128
    Senior Member
    Join Date
    May 2018
    Posts
    197
    The shift you have in Turrican is not because of the VGA driver but is a bug in the emulator.
    You have the issue with other games as Toki.
    I have it too.

  4. #129
    Member
    Join Date
    Aug 2020
    Location
    France
    Posts
    72
    Hello Jean Marc

    I'm back home and tested what you say , it change nothing for the drift to right.
    It's not just on emulator but generic , it do also the same with the demo program.

    I don't remember what we do in the pas to recenter the picture .....

    Cheers.

  5. #130
    Senior Member
    Join Date
    May 2018
    Posts
    197
    sorry for the late reply.
    Not sure what is wrong with your monitor.
    I had updated the code the last w-e with the reduced values of the back porch.
    I tested on the 3 monitors I have here. They have an auto adjust option so I never have this shifting issue.

    I also added a mechanism to allow pixel shift between upper and lower nibble of the 2 DMA copy (in copyline mode only)
    That allows to compensate the delay between 2 DMA channels but I noticed that the delay is not constant so it does not really help to resolve the sharpness.

    In meanwhile I have now MIDI support for the Atari ST emulator published.
    I loved the Amiga but I had first an AtariST after my Vic20 and C64.
    Even if less powerful, it had at least MIDI interface which made it popular for musicians...;-)

    https://www.youtube.com/watch?v=H-TlCDBwdak
    https://www.youtube.com/watch?v=fzoTYUpEOKs

  6. #131
    Member
    Join Date
    Aug 2020
    Location
    France
    Posts
    72
    Hi Jean Marc
    I found another screen for VGA testing , now it's OK , the auto correction work and the left part of screen is finally filled
    On Amiga workbench , the bottom pixels are off screen , i don't remember the workbench resolution , i will have to test with other soft and games for see if it's the same.
    The FR keyboard mapping is not able to put 'm', ',' and some other chars , i think it will be better to test it with US KB , but i don't have one , so we see if all key's are working before modding the KB code.
    Congrats for this work , it's like i have my Amiga again
    But , it will be too easy of they are no ... bugs ... after some minutes , the screen come black and nothing respond , first i have think it was because PSRAM was not active in platform_config , but when it's set it appear to change nothing for the black screen after some min , i compile for smallest code or it don't fit the teensy

    Cheers.

  7. #132
    Senior Member
    Join Date
    May 2018
    Posts
    197
    I get this problem of the black screen from time to time (with all emulator and especially doom)
    When I have it, I close teensyduino SDK fully and reopen it with the project.
    Recompile and re-flash and it is gone! I don't know what it is...It is like the VGA interrupt stops fully because the CPU is starved for seconds?
    May be location where code ends up is the problem?
    It is now running the workbench since 1/2 hour and it is stable for me. It is really sporadic but I also have it.

    There are definitively bugs ;-(
    The missing lines at bottom is true. If you select NTSC resolution it is not there.
    I also have many games that fails from floppies but works great with whdload from HDD.

    For the keyboard the m works with Belgian French keyboard.
    Do you select the layout of the keyboard from Teensyduino/tools?
    ; is not working also for me.

  8. #133
    Senior Member
    Join Date
    May 2018
    Posts
    197
    for the missing lines you can play with the option
    gfx_correct_aspect in uae.cpp.

    Setting to 1 will fit the image to the 240 available lines but as a result will remove some lines at fixed position to insure the scaling=> not sure it is what you would like.

  9. #134
    Senior Member
    Join Date
    May 2018
    Posts
    197
    you can also let run the emu at full VGA res
    in teensyuae41.ino use tft.begin(VGA_MODE_640x480);
    and in uae.cpp
    #define WIN_H TFT_HEIGHT*2

    It will skip lines also but use the full res available.

  10. #135
    Member
    Join Date
    Aug 2020
    Location
    France
    Posts
    72
    Hi
    I have made your change , it's strange like this ... he he
    I check on wiki for the original Amiga res , it is :
    Users could customize four display colours and choose from two resolutions: 640200 or 640400 (interlaced) on NTSC, or 640256 or 640512 on PAL systems. In later revisions, the TV or monitor overscan could be adjusted
    Games use less to get more colors , it's difficult to create a resolution that will accept all , and change resolution on the fly it's allot of work too ....
    But for know all available Amiga resolution it's not a bad idea to start deluxe paint IV and take a look at display mode options , if i remember , every display information was present.
    Emulators on PC don't have this problem , they just put the Amiga screen into a windows that fit the desired resolution , what is not so easy with a MCU like the teensy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •