-- NNGS.txt Question: what value for parameter 3 bit 40H IM page 8 ? x60000-9FFFF 256KB Display buffer (Not Used) A00000-AFFFF 64K Display buffer C0000 GDC Write Parameter, Read Status C0001 GDC Write Command, Read Data C0100-C01FF 256 Red Look up table C0200-C02FF 256 Green Look up table C0300-C03FF 256 Blue Look up table C0700 3400 FF ZOOM 1 (FF default, 00 more blowup) C0701 3401 FF ZOOM 2 (FF default, 00 more blowup) C0702 3402 F ZOOM 4 (FF default, 00 more blowup) C0703 3403 F ZOOM 8 (FF default, 00 more blowup) C0704 3404 F MODE (00 plane, FF pixel) C0705 3405 BANK0 C0706 3406 BANK1 C0707 3407 FF BUS ENABLE ((00 disable, FF enable) INIT←TABLE DB 01FH 37Q ; standard initialization table DB 03EH 76Q ; RS170A INTERLACED DB 064H 144Q ; 512X480 DISPLAY DB 008H ; 512X512 BIT-PLANE DB 005H DB 003H DB 0F0H 360Q DB 040H 100Q PRAM←TABLE DB 000H ; screen parameters DB 000H ; START DISPLAY AT 0,0 DB 000H DB 07FH 177Q ;or IMAGE←BIT? IMAGE←BIT DB 040H 100Q hex octal page GDC Command Name --- ----- ---- ----------------- 0 0 9 Reset(,,,,,,,) 0C 14Q 10 BCtrlBlank() 0D 15Q 10 BCtrlUnblank() 6F 157Q 10 VSynchMaster() 46 106Q 11 Zoom(DispGChr) 47 107Q 11 Pitch(horizontalWordCount=PixCnt/8) 4A 112Q 12 Mask(MaskL, MaskH) 4B 113Q 10 CChar(,,) 6B 153Q 10 Start() 70 160Q 11 PRam( ... ) ;parameter ram 78 170Q 11 PRam( ... ) ;graphics parameters Intialization: Mem(C0704) ← FF, Mem(C0707) ← FF Reset[0, 1F, 3E, 64H, 8, 5, 3, F0, 40H] Pitch[047H, 40H] VSynchMaster[06FH] Zoom[46H, 0] Mem(C0700-3) ← FF CChar[4B, 0, 0C0, 0] ; disable character mode PRam[70H, 0, 0, 0, 7F(or 3F)] ;screen parameters DISPLAY AT 0,0 PRam[78H, FF,FF,FF,FF, FF,FF,FF,FF ] ; graphics parameters Mask[4AH, 0FF, 0FF] ; set mask to all 1s Mem(C0100-C01FF) ← red Mem(C0200-C02FF) ← green Mem(C0300-C03FF) ← blue Start[6BH] ; start the display BCtrlUnblank[0D] -------------------------------------------------------- Summary of init.asm: NNGS ;ENABLE CARD AND PIXEL MODE ACCESS PIX←DMA Mem(C0704) ← FF, Mem(C0707) ← FF RESET(AL) don't wait just do: Reset[0, 1F, 3E, 64H, 8, 5, 3, F0, 40H] INIT←PARMS SET←PITCH Pitch[047H, 40H] ;set pitch to 512X512 BIT-PLANE VSynchMaster[06FH] ; set vertical sync ZOOM Zoom[46H, ZOOM=0] FOR i from 0 to 3 do Mem(C0703+i) ← LeftShift(ZOOM, i) DIS←CHR CChar[4B, 0, 0C0, 0] ; disable character mode PAR←RAM PRam[70H, 0, 0, 0, 7F(or 3F)] ;screen parameters DISPLAY AT 0,0 GRAF←PAR PRam[78H, FF,FF,FF,FF, FF,FF,FF,FF ] ; graphics parameters SET←MASK(AX) Mask[4AH, 0FF, 0FF] ; set mask to all 1s CLEAR Mem(C0705) ← 0, Mem(C0705) ← 0, For i = 0 to 0FFFF do Mem(A0000+i) ← 0 Mem(C0705) ←FF, Mem(C0705) ← 0, For i = 0 to 0FFFF do Mem(A0000+i) ← 0 Mem(C0705) ← 0, Mem(C0705) ←FF, For i = 0 to 0FFFF do Mem(A0000+i) ← 0 Mem(C0705) ←FF, Mem(C0705) ←FF, For i = 0 to 0FFFF do Mem(A0000+i) ← 0 RGBW←PAL STEP←PAL(BX, DI) PALMOV VSYNC Memory(C0000:Status) and 020H 0->1 Mem(C0100-C01FF) ← red Mem(C0200-C02FF) ← green Mem(C0300-C03FF) ← blue START←DISP Start[6BH] ; start the display UN←BLANK BCtrlUnblank[0D] CLR←MSK SET←MASK [AX: 0FFFF] BLANK BCtrlUnblank[0C] PLANE←DMA Mem(C0704) ← 0, Mem(C0707) ← FF OUT←COMD(AL) Until Mem(C0000) and 2 = 0 wait Mem(C0001) ← AL OUT←PAR(AL) Until Mem(C0000) and 2 = 0 wait Mem(C0000) ← AL