VB81 is not designed to run hi-res graphics on the video IO/rebuild display routine.
Only the hi-res graphics cards are properly emulated.
UDG's and RocketMan like can be used, but most of early hi-res stuff just get a blank screen.
This failing is due to the poor visual BASIC accuracy and the choice to bypass the ZX81's display routine to speed up the emulator and run it on a 200 Mhz PC.
To run a hight res program, prefer EO to get the right display...
You can use external libraries or API calls to achieve more accurate timing functionality in VB6. For example, you can use the Windows API to call assembly code written in a separate DLL file. Here's a simple demonstration using inline assembly in a DLL and calling it from VB6:
First, create a new DLL project in a language that supports inline assembly, such as C or C++. Here's an example in C:
__declspec(dllexport) int AddNumbers(int a, int b)
mov eax, a
add eax, b
mov result, eax
Compile the DLL code to produce the DLL file. Let's assume the DLL file is named "ExampleDLL.dll."
Next, create a new VB6 project and add a command button to the form. Double-click the command button to open its click event handler, and add the following code:
Private Declare Function AddNumbers Lib "ExampleDLL.dll" (ByVal a As Long, ByVal b As Long) As Long
Private Sub Command1_Click()
Dim a As Long
Dim b As Long
Dim result As Long
a = 10
b = 20
result = AddNumbers(a, b)
MsgBox "The result is: " & result, vbInformation, "Inline Assembly Demo"
In this VB6 code, we're using the Declare statement to import the AddNumbers function from the DLL file we created earlier. Then, we call the AddNumbers function with two integer parameters and display the result in a message box.
When you run the VB6 project and click the command button, the AddNumbers function in the DLL will be invoked with the values 10 and 20, and the result will be displayed in a message box.
Keep in mind that inline assembly is not a standard feature of VB6, and this approach involves using external libraries and potentially unsafe code. Therefore, caution should be exercised when working with inline assembly in this manner.
I've never had problems running Pseudo Hires in VB81.
I ever code DLLs in VB, but better rewrite an emulator in a new language.
I decide to code and upgrade VB81 to complement EO from 2005.
At the time, only a handful of HRG games were available.
But, the ZX81's spirit wasn't target on HRG, UDG was the standard...
In 1984, if you wanted HRG graphics, you had to buy a Spectrum!
Better let a chance to the wonderful EO to test ours HRG games.
Greg, i used to run all HRG programs in EO... I prefer not to be forced to be disappointed with VB81!
> FYI, it is quite simple to use the QS board for hires dev, in lieu of WRX. They have the same resolution unlike Memotech HRG. As I recall all that is
> needed is to change the pointer to the WRX dfile to the QS dfile and turn off the WRX display driver.
> I've never had problems running Pseudo Hires in VB81.
This link confirms VB81 does emulate QS-HRG:
Q1: Does the QS-HRG ROM, in the ROMS directory, replace the ZX81 ROM and how exactly is VB81 QS-HRG emulation setup, so RAND USR 11036 can auto test its functionality?
Q2: Could the following 'HIRES' SRC, from post #1 .P file, be modified to use VB81 QS board emulation for hires, in lieu of WRX, etc., without reinventing-the-wheel?
Code: Select all
; ; pachires.asm ; ; hires routines ;switch to high res hires ;wait for an interrupt halt ;wait for a vsync ld a,(FRAMES) ld c,a sync1 ld a,(FRAMES) cp c jr z,sync1 ;replace the render routine ld ix,hresgen ret ;switch back to low res lores ;wait for an interrupt halt ;wait for a vsync ; ld a,(FRAMES) ; ld c,a sync2 ; ld a,(FRAMES) ; cp c ; jr z,sync2 ;reset the I register to the ROM default ld a,$1e ld i,a ;put back the normal display routine ld ix,DISPROUT ret ;actual hires routine hresgen ;slightly odd address - but it's basically 'back one line' from the start of the screen memory ;with bit 15 of the address set ld hl,(HDISPLAY - DISPLEN) + $8000 ;set the line width ld de,DISPLEN ;the ULA port address ld c,$0FE ;offset within the ROM that gives us the best bit patterns for this game... ld a,HIRES_IDX ld i,a ;delay to sync with tv ld b,5 syncx djnz syncx ;draw 192 lines of hires things ld b,$c0 hreslp1 ;keep the ULA thinking it's on the first line of a character in a,(c) out ($ff),a add hl,de call intoula dec b jp nz,hreslp1 ;sneakily jump into a couple of ROM routines call DISPLAY_3 call SLOWORFAST + $19 ld ix,hresgen ;jump back into the ROM jp (DISPLAY_3 + $12) intoula jp (hl)
I got some demo programs in the "HRG-CARDs-DEMO\QS HRG" folder to function with VB81, but no docs.
Therefore, the next challenge is to convert the two WRX files in the following link to QS HRG, that Greg reported earlier, he was able to do.
DUMMY_DISPLAY_FILE_16692->16692; Bug in KB64K, now functional
PS. If anyone fully understands 'D_D_F', please post memory locations where it can be accessed, Developer placed it in the 8K-16K RAM area, which failed on this rig!