# This is an ide startup file. report=4 # set verbose, but not debug $stoponerr=1 hinv -v gioslot { $tmp = mg_setboard 0; if ($tmp) { echo "Found boards in slot 0" } else { $tmp = mg_setboard 1; if ($tmp) { echo "Found boards in slot 1" } else { echo "No boards found in slot 0 or slot 1" } } } ra_menu { echo "" echo " WELCOME TO MARDIGRAS !" echo "" echo " MGRAS IDE Commands " echo "" echo "======================================================================" echo " cmap_menu vc3_menu dac_menu rss_menu dma_menu" echo " mg_reset bkend hq3_menu" echo " hq3test dactest vc3test cmaptest dmatest" echo " gioslot rdram_repair" echo "======================================================================" echo "" echo "" } hq3_menu { echo "" echo "===== HQ3 DIAG CMDS MENU =====" echo "mg_hq3 mg_hq3_initcheck mg_hq3_RegWr mg_hq3_RegRd " echo "mg_hq3_RegVf mg_hq3_FifoWr mg_hq3_FifoWr64 " } cmap_menu { echo "" echo "===== CMAP DIAG CMDS MENU =====" echo "" echo " CMAP commands require cmapID as an argument, cmapID : 0/1" echo "" echo "cmaptest - test CMAP " echo "mg_cmaprev (c0) mg_cmapaddrsbus (c1)" echo "mg_cmapaddrsuniq (c2) mg_cmappatrn(c3)" echo "mg_cmapdatabus(c4) mg_cmapuniqtest(c5)" echo "" echo "mg_pokecmap mg_peekcmap " echo "" } vc3_menu { echo "" echo "===== vc3 DIAG CMDS MENU =====" echo "" echo "vc3test - test vc3 Regs + vc3 Sram - " echo "mg_vc3internalreg (v0) " echo "mg_vc3init (v1) mg_vc3reset (v2)" echo "mg_vc3addrsbus (v3) mg_vc3databus (v4)" echo "mg_vc3patrn (v5) mg_vc3addrsuniq (v6)" echo "mg_vc3disabledsply (v7) mg_vc3enabledsply (v8)" echo "mg_vc3cursorenable (v9) mg_vc3cursordisable (v10)" echo "mg_vc3cursormode (v11) mg_vc3cursorposition (v12)" echo "mg_vc3cursormode (v13) mg_vc3clearcursor (v14)" echo "mg_starttiming (v15) mg_stoptiming (v16)" echo "" echo "mg_pokevc3 mg_peekvc3" echo "mg_peekvc3ram mg_pokevc3ram" echo "" } dac_menu { echo "" echo "===== DAC DIAG CMDS MENU =====" echo "" echo "dactest - test dac Regs + dac Gamma Tables - " echo "mg_dacpllinit (d0) " echo "mg_dacreset (d1) mg_dacctrlreg (d2) " echo "mg_dacmodereg (d3) mg_dacaddrreg (d4) " echo "mg_clrpaletteaddrUniq(d5) mg_clrpalettewalkbit(d6) mg_clrpalettepatrn(d7) " echo "" echo "mg_peekdacaddr mg_pokedacaddr " echo "mg_peekdacaddr16 mg_pokedacaddr16 " echo "mg_peekdacmode mg_pokedacmode " echo "mg_peekdacctrl mg_pokedacctrl " echo "mg_pokeclrpalette mg_peekclrpalette " echo "" } ge_menu { echo "" echo "===== GE11 DIAG CMDS MENU =====" echo "mg_set_ge (0|1) mg_ucode_a mg_ge_ucode_m mg_ge_ucode_w" echo "mg_ge_reg_dump mg_ge_reg ge0_ucode ge1_ucode" echo "tge_setup tge_test ge0_test ge0_setup" echo "ge1_setup ge1_test" } enabdisp { mg_pokexmap -r XMAP_DIB_CTRL0 -d 0x100 } disabdisp { mg_pokexmap -r XMAP_DIB_CTRL0 -d 0x100 } execbitrete { mg_wr_rss_reg -g0x13 -d0x0 -x } execbitre { mg_wr_rss_reg -g0x45 -d0x0 -x } rdram_repair { mg_rdram_addrbus; mg_rdram_databus; mg_rdram_unique; mg_rdram_pio_memtest; } rss_reg_menu { echo "" echo "===== RSS Register Tests MENU =====" echo "" echo "mg_re_status_reg mg_re_rdwr_regs " echo "mg_te_rev mg_te_rdwr_regs " echo "mg_rdram_addrbus mg_rdram_databus " echo "mg_rdram_unique mg_re_internal_ram mg_rdram_pio_memtest " } rss_draw_menu { echo "" echo "===== RSS Drawing Tests MENU =====" echo "" echo "mg_z_tri mg_points mg_lines" echo "mg_stip_tri mg_xblock mg_chars " echo "mg_logicop mg_dither mg_color_tri" echo "mg_notex_poly mg_notex_line mg_tex_poly" echo "mg_tex_1d mg_tex_3d mg_tex_scistri" echo "mg_tex_linegl mg_tex_load mg_tex_persp" echo "mg_tex_mag mg_tex_detail mg_tex_bordertall " echo "mg_tex_mddma mg_tex_lut4d mg_tex_borderwide" } rss_dma_menu { echo "" echo "===== RSS DMA Tests MENU =====" echo "" echo "mg_dma_pp mg_dma_tram mg_tram_rev" echo "mg_tram_bus mg_tram_pg mg_tram_mem_pat" echo "mg_tram_mem_w10 mg_tram_mem_f0" } # Walk 0,1 on 16 bits to test out the tram-re bus # Writes 32 locations on 1 page. mg_tram_bus { mg_dma_tram -e1 -p -s8 -t4 -g1 -m0 } # Write pg num to even # pgs, ~pg to odd # pgs. # Write to 1 location per page mg_tram_pg { mg_dma_tram -e1 -s1 -t1 -m1 } # Test tram memory with the rotating pattern test mg_tram_mem_pat { mg_dma_tram -e1 -m3 } # Test tram memory with the walking 1 pattern repeated mg_tram_mem_w10 { mg_dma_tram -e1 -p -m0 } # Test tram memory with alternating ffff, 0000 in each texel mg_tram_mem_f0 { mg_dma_tram -e1 -p -m3 } dt1 { fpusetup mg0_tri -x 100 200 0 99 6 8 2 -d 150 100 0 50 96 9 1 -n 0 20 0 0 6 98 7 } dt2 { fpusetup mg0_tri -x 0 1000 0 100 0 0 0 -d 1200 500 0 0 100 0 0 -n 0 0 0 0 0 100 0 } scene1 { mg0_clear_color dt2 dt1 mg0_line -x 1000 1000 0 100 100 0 0 -n 0 0 0 100 100 0 0 mg0_line -x 0 1000 0 100 0 100 0 -n 1000 0 0 100 100 0 0 mg0_clear_color -t 500 500 -d 600 600 mg0_point -x 551 -y 551 -r 100 -g100 -b100 -a100 mg0_rect -t 900 100 -d 1000 200 -r100 -g 20 -b 100 } rss_utils_menu { echo "" echo "===== RSS Utilities MENU =====" echo "" echo "mg_wr_rss_reg mg_rd_rss_reg mg_re_rac_reg" echo "mg_rss_init mg_rd_rdram_reg mg_wr_rdram_reg " echo "mg_wr_rac_reg mg_rd_rac_reg mg0_rect" echo "mg_do_indirect mg0_clear_color mg0_tri " echo "mg0_point mg0_line mg0_bars" echo "mg_rd_rdram_pio mg_wr_rdram_pio rsstest" echo "rss_0 rss_2 rss_dma" echo "mg_sync_pprdram mg_sync_repp" echo "bufselcheck syncrepp1 syncrepp2 syncrepp3 syncrepp4" echo "rdraminit allsetup tepx mg_xy_to_rdram" echo "mg_draw_rect_comp mg_read_fb mg_rdram_ccsearch" echo "mg_set_0ge" } rss_menu { echo "" echo "===== RSS DIAG CMDS MENU =====" echo "" echo "rss_reg_menu rss_draw_menu rss_dma_menu rss_utils_menu" } dma_menu { echo "" echo "===== DMA DIAG CMDS MENU =====" echo "" echo "mg_host_hqdma (dma1) mg_host_hq_cp_dma (dma2)" echo "mg_host_hq_cp_ge_dma (dma3) mg_host_hq_cp_ge_re_dma (dma4)" echo "mg_host_hq_cp_ge_re_dma_data (dma5)" echo "mg_dma_pp mg_dma_tram" } mg_tram_rev_nobuff { mg_dma_tram -r -e 1 -p $foo = mg_setnumre4s -q if ($foo == 2) { mg_dma_tram -r -e 1 -p -n 1 } } mg_tram_rev { buffon; mg_dma_tram -r -e 1 -p $foo = mg_setnumre4s -q if ($foo == 2) { mg_dma_tram -r -e 1 -p -n 1 } resetcons; buffoff; } vline { mg0_line -x $1 1023 0 100 100 100 100 -n $1 0 0 100 100 100 100 } hline { mg0_line -x 1279 $1 0 100 100 100 100 -n 0 $1 0 100 100 100 100 } clear_fbgone { mg0_clear_fbgone mg_wr_rss_reg -g0x15c -d 0x2c000161 mg_wr_rss_reg -g0x15d -d 0x4300 mg_wr_rss_reg -g0x15c -d 0x05000000 mg_wr_rss_reg -g0x15d -d 0x0 mg_wr_rss_reg -g0x15c -d 0x16000000 mg_wr_rss_reg -g0x15d -d 0x0 mg_wr_rss_reg -g0x15c -d 0x2c000161 mg_wr_rss_reg -g0x15d -d 0x4200 } clean_disp { mg0_clean_disp mg_wr_rss_reg -g0x15c -d 0x2c000161 mg_wr_rss_reg -g0x15d -d 0x4300 mg_wr_rss_reg -g0x15c -d 0x05000000 mg_wr_rss_reg -g0x15d -d 0x0 mg_wr_rss_reg -g0x15c -d 0x16000000 mg_wr_rss_reg -g0x15d -d 0x0 mg_wr_rss_reg -g0x15c -d 0x2c000161 mg_wr_rss_reg -g0x15d -d 0x4200 } tstat { mg_hq3_RegRd 0x70000 0xffffffff mg_re_status_reg } # # START OF MGRAS TESTS delay { ide_delay -s 2; } gioslot0 { mg_setboard 0; } gioslot1 { mg_setboard 1; } allsetup { gioslot mg_gfxreset; delay; mg_set_0ge; delay; mg_reset; delay; delay; resetcons if (!mg_gfxconsole) { mg_sync_repp mg_sync_pprdram mg_xmapinit mg_rdram_ccsearch mg_initppregs enabdisp mg0_clear_color } } hq3test { echo "------ Executing Hq3 Test Suite ------" buffon; mg_gfxreset; delay; mg_set_0ge $status = mg_hq3_initcheck; # if ($status) { # $failed = 1; # echo "mg_hq3_initcheck"; # return(-1); # } $status = mg_hq3; if ($status) { $failed = 1; return(-1); } mg_gfxreset; delay; $status = mg_hq3_cp; $status = mg_hq3_converter; if ($status) { $failed = 1; wait ; } $status = mg_hq3_cfifo; if ($status) { $failed = 1; return(-1); } echo "******** Hq3 Test Suite Execution Completed ********\n" resetcons; buffoff } # GE11 test scripts gioslot_2GE { $tmp = mg_setboard 0; if ($tmp) { echo "Mgras Gfx init to GIO Slot 0 " mg_setboard 0 2; } else { $tmp = mg_setboard 1; if ($tmp) { echo "Found boards in slot 1" mg_setboard 1 2; } else { echo "No boards found in slot 0 or slot 1" } } } ge0_ucode { mg_reset; $ge_no = mg_queryGE; if ($ge_no == 0) { echo "GE11 doesn't exist\n"; } else if ($ge_no == 1){ echo "\ntesting GE0 Ucode memory....\n"; gioslot; buffon; mg_gfxreset; mg_set_ge 0; $status = mg_ge_ucode_a if ($status) { $failed = 1; return(-1); } $status = mg_ge_ucode_m if ($status) { $failed = 1; return(-1); } } else if ($ge_no == 2) { echo "\ntesting GE0 Ucode memory....\n"; gioslot_2GE; buffon; mg_gfxreset; mg_set_ge 0; $status = mg_ge_ucode_a if ($status) { $failed = 1; return(-1); } $status = mg_ge_ucode_m if ($status) { $failed = 1; return(-1); } } } ge1_ucode { mg_reset; $ge_no = mg_queryGE; if ($ge_no == 2) { echo "\ntesting GE1 Ucode memory....\n"; gioslot_2GE; buffon; mg_gfxreset; mg_set_ge 1; $status = mg_ge_ucode_a if ($status) { $failed = 1; return(-1); } $status = mg_ge_ucode_m if ($status) { $failed = 1; return(-1); } } else { echo "GE11 doesn't exist\n"; } } getest { # echo "------ Executing GE COREs Test Suite ------" # $status = mg_ge_ucode_a; # if ($status) { # $failed = 1; # return(-1); # } # # $status = mg_ge_ucode_m; # if ($status) { # $failed = 1; # return(-1); # } # $status = mg_hq3_dnload; # $status = mg_ge11_dnload; # $status = mg_ge_go; $status = mg_ge_inst; if ($status) { $failed = 1; return(-1); } $status = mg_ge_cram; if ($status) { $failed = 1; return(-1); } $status = mg_ge_eram; if ($status) { $failed = 1; return(-1); } $status = mg_ge_wram; if ($status) { $failed = 1; return(-1); } $status = mg_ge_alu; if ($status) { $failed = 1; return(-1); } $status = mg_ge_dreg; if ($status) { $failed = 1; return(-1); } $status = mg_ge_dma; if ($status) { $failed = 1; return(-1); } echo "******** GE Test Suite Execution Completed ********" } ge0_setup { mg_reset; $ge_no = mg_queryGE; if ($ge_no == 0) { echo "No GE11 exists\n"; } if ($ge_no == 2) { echo "------ Executing GE0 test setup ------" gioslot_2GE; mg_hq3_dnload; mg_gfxreset; mg_set_ge 0; mg_ge11_dnload; mg_ge_go; } if ($ge_no == 1) { echo "------ Executing GE0 test setup ------" gioslot_2GE; mg_hq3_dnload; mg_gfxreset; delay; mg_ge11_dnload; mg_set_ge 0; mg_ge_go; } # buffoff; resetcons; } ge0_test { mg_reset; $ge_no = mg_queryGE; if($ge_no == 0) { echo "No GE11 exists\n"; } else { echo "------ Executing GE Test Suite on :: GE0 ------" ge0_ucode; ge0_setup; buffon mg_gfxreset delay; mg_pon_puts -s "testing ge0_core....\n\r"; $status = getest; if ($status) { $failed = 1; return(-1); } } # buffoff; resetcons; } ge1_setup { mg_reset; $ge_no = mg_queryGE; buffon; if($ge_no == 2) { echo "------ Executing GE1 test setup ------" gioslot_2GE; buffon mg_gfxreset; mg_set_2ge; mg_set_ge 0; mg_hq3_dnload; mg_ge11_dnload; mg_ge_go; mg_set_ge 1; mg_ge11_dnload; mg_ge_go; mg_gfxreset; mg_set_2ge; mg_set_ge 0; mg_nextge; mg_set_ge 1; } if($ge_no == 1) { echo "GE11_1 doesn't exist\n"; } buffoff; resetcons; } ge1_test { mg_reset; $ge_no = mg_queryGE; buffon; if($ge_no == 2) { mg_gfxreset; echo "------ Executing GE Test Suite :: GE1 ------" ge1_ucode; ge1_setup; $status = getest; if ($status) { $failed = 1; return(-1); } } if($ge_no == 1) { echo "GE11_1 doesn't exist\n"; } buffoff; resetcons; } tge_setup { mg_reset; $ge_no = mg_queryGE; if ($ge_no == 2) { echo "=== tge_setup ===\n"; gioslot_2GE; buffon; mg_hq3_dnload; mg_gfxreset; delay; mg_set_ge 0; mg_ge11_dnload; mg_ge_go; mg_set_ge 1; mg_ge11_dnload; mg_ge_go; mg_set_ge 0; resetcons; buffoff; } if($ge_no == 1) { echo "Setup GE11_0 only\n"; ge0_setup; } if($ge_no == 0) { echo "NO ge11 exists\n"; } buffoff; resetcons; } tge_test { mg_reset; $ge_no = mg_queryGE; if ($ge_no == 2) { mg_pon_puts -s "testing ge0_ucode....\n\r"; ge0_ucode; mg_pon_puts -s "testing ge1_ucode....\n\r"; ge1_ucode; mg_pon_puts -s "testing tge_setup....\n\r"; tge_setup; gioslot_2GE; buffon mg_gfxreset delay; mg_set_2ge; mg_set_ge 0 mg_ge_go mg_set_ge 1 mg_ge_go mg_set_ge 0 echo " testing GE0 COREs....\n"; $status = getest if ($status) { $failed = 1; resetcons; buffoff; return(-1); } mg_nextge; mg_set_ge 1; mg_ge_go echo " testing GE1 COREs....\n"; $status = getest if ($status) { $failed = 1; resetcons; buffoff; return(-1); } resetcons; buffoff } if ($ge_no == 1) { echo "Test only GE11_0\n"; $status = ge0_test; if ($status) { $failed = 1; resetcons; buffoff; return(-1); } resetcons; buffoff } if ($ge_no == 0) { echo "No GE11 exists\n"; ge0_test; } } # End of Ge test scripts dactest { echo "------ Executing DAC Test Suite ------" $status = mg_dacreset; if ($status) { $failed = 1; return(-1); } $status = mg_dacmodereg; if ($status) { $failed = 1; return(-1); } $status = mg_dacreset; if ($status) { $failed = 1; return(-1); } $status = mg_dacaddrreg; if ($status) { $failed = 1; return(-1); } $status = mg_dacreset; if ($status) { $failed = 1; return(-1); } $status = mg_clrpaletteaddrUniq; if ($status) { $failed = 1; return(-1); } $status = mg_dacreset; if ($status) { $failed = 1; return(-1); } $status = mg_clrpalettewalkbit; if ($status) { $failed = 1; return(-1); } $status = mg_dacreset; if ($status) { $failed = 1; return(-1); } $status = mg_clrpalettepatrn; if ($status) { $failed = 1; return(-1); } $status = mg_dacreset; if ($status) { $failed = 1; return(-1); } echo "******** DAC Test Suite Execution Completed ********" } vc3test { echo "------ Executing VC3 Test Suite ------" $status = mg_vc3reset; if ($status) { $failed = 1; return(-1); } $status = mg_vc3internalreg; if ($status) { $failed = 1; return(-1); } $status = mg_vc3addrsbus; if ($status) { $failed = 1; return(-1); } $status = mg_vc3databus; if ($status) { $failed = 1; return(-1); } $status = mg_vc3addrsuniq; if ($status) { $failed = 1; return(-1); } $status = mg_vc3patrn; if ($status) { $failed = 1; return(-1); } echo "******** VC3 Test Suite Execution Completed ********" } cmaptest { echo "------ Executing CMAP Test Suite ------" $status = mg_vc3init 0x555; if ($status) { $failed = 1; return (-1); } $status = mg_cmaprev; if (!$status) { $failed = 1; return (-1); } $status = mg_cmapdatabus 0; if ($status) { $failed = 1; return (-1); } $status = mg_cmapaddrsbus 0; if ($status) { $failed = 1; return (-1); } $status = mg_cmappatrn 0; if ($status) { $failed = 1; return (-1); } $status = mg_cmapaddrsuniq 0; if ($status) { $failed = 1; return (-1); } $status = mg_cmapdatabus 1; if ($status) { $failed = 1; return (-1); } $status = mg_cmapaddrsbus 1; if ($status) { $failed = 1; return (-1); } $status = mg_cmappatrn 1; if ($status) { $failed = 1; return (-1); } $status = mg_cmapaddrsuniq 1; if ($status) { $failed = 1; return (-1); } $status = mg_cmapuniqtest; if ($status) { $failed = 1; return (-1); } echo "******** CMAP Test Suite Execution Completed ********" } bkend { buffon; mg_pon_puts -s "--- Executing Back End Test Suite ---\n\r" $status = dactest; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing vc3test....\n\r"; $status = vc3test; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing cmaptest....\n\r"; # $status = cmaptest; if ($status) { $failed = 1; return(-1); } # $status = mg_reset; if ($status) { $failed = 1; return(-1); } delay; mg_pon_puts -s "testing mg_xmapdcbreg 0....\n\r"; $status = mg_xmapdcbreg 0; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_xmapdcbreg 1....\n\r"; $status = mg_xmapdcbreg 1; if ($status) { $failed = 1; return(-1); } $tmp = mg_setnumre4s -q if ($tmp == 2) { mg_pon_puts -s "testing mg_xmapdcbreg 2...\n\r"; $status = mg_xmapdcbreg 2; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_xmapdcbreg 3...\n\r"; $status = mg_xmapdcbreg 3; if ($status) { $failed = 1; return(-1); } } $status = mg_reset; if ($status) { $failed = 1; return(-1); } delay; mg_pon_puts -s "testing mg_crcwalk ...\n\r" $status = mg_crcwalk; if ($status) { $failed = 1; return(-1); } # delay; mg_pon_puts -s "Executing mg_vc3cursorposition test...\n\r" mg_reset; delay; mg_xmapinit; delay; # mg0_clear_color -b 100 repeat 3 { delay } mg_pon_puts -s "testing mg_vc3cursorposition....\n\r"; $status = mg_vc3cursorposition; if ($status) { $failed = 1; resetcons; buffoff; return(-1); } resetcons; buffoff; mg_pon_puts -s "*** Back End Test Suite Execution Completed ***\n\r" } re4test { echo "------ Executing RE4 Test Suite ------" $status = mg_re_status_reg; if ($status) { $failed = 1; return(-1); } led 0; $status = mg_re_rdwr_regs; if ($status) { $failed = 1; return(-1); } $status = mg_re_internal_ram -t0; if ($status) { $failed = 1; return(-1); } $status = mg_re_internal_ram -t1; if ($status) { $failed = 1; return(-1); } $status = mg_re_internal_ram -t2; if ($status) { $failed = 1; return(-1); } led 1; $status = mg_re_internal_ram -t3; if ($status) { $failed = 1; return(-1); } $status = mg_re_internal_ram -t4; if ($status) { $failed = 1; return(-1); } $status = mg_re_internal_ram -t5; if ($status) { $failed = 1; return(-1); } echo "******** RE4 Test Suite Execution Completed ********" } dmatest { echo "------ Executing DMA Test Suite ------" $status = mg_host_hqdma; if ($status) { $failed = 1; return(-1); } $status = mg_host_hq_cp_dma; if ($status) { $failed = 1; return(-1); } # $status = mg_ge_dma; # if ($status) { # $failed = 1; # return(-1); # } # DMA PIO Test $status = mg_dma_pp -r1 -e1 -w1 -d1 -t -m 0 0 -b 0x240 -y 16 -z 192 if ($status) { $failed = 1; return(-1); } echo "******** DMA Test Suite Execution Completed ********" } tramtest { echo "------ Executing TRAM Test Suite ------" # TRAM REV $status = mg_dma_tram -e1 -p -r if ($status) { $failed = 1; return(-1); } # TRAM RAM TEST $status = mg_dma_tram -e0 -w if ($status) { $failed = 1; return(-1); } echo "******** TRAM Test Suite Execution Completed ********" } # allows colors to be correct for drawings drawsetup { delay; # mg_gfxreset; # mg_set_0ge; # mg_reset; delay; delay; mg_xmapinit; } drawclose { delay; # resetcons; delay; delay; } tex_draw_test { echo "------ Executing tex_draw_test Suite ------" mg_pon_puts -s "testing mg_notex_line....\n\r"; drawsetup; $status = mg_notex_line delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_notex_poly....\n\r"; delay; $status = mg_notex_poly delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_poly....\n\r"; delay; $status = mg_tex_poly delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_id....\n\r"; delay; $status = mg_tex_1d delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_3d....\n\r"; delay; $status = mg_tex_3d delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_scistri....\n\r"; delay; $status = mg_tex_scistri delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_linegl....\n\r"; delay; $status = mg_tex_linegl delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_load....\n\r"; delay; $status = mg_tex_load delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_persp....\n\r"; delay; $status = mg_tex_persp delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_mag....\n\r"; delay; $status = mg_tex_mag delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_detail....\n\r"; delay; $status = mg_tex_detail delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_bordertall....\n\r"; delay; $status = mg_tex_bordertall delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_lut4d....\n\r"; delay; $status = mg_tex_lut4d delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_borderwide....\n\r"; delay; $status = mg_tex_borderwide delay; if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing mg_tex_mddma....\n\r"; delay; $status = mg_tex_mddma delay if ($status) { $failed = 1; return(-1); } mg_pon_puts -s "testing drawclose....\n\r"; drawclose; echo "******** tex_draw_test Suite Execution Completed ********" } repp_test { echo "------ Executing RE-PP Test Suite ------" drawsetup; $status = mg_z_tri delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_lines delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_points delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_stip_tri delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_xblock delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_chars delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_logicop delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_dither delay; if ($status) { $failed = 1; return(-1); } delay; $status = mg_color_tri delay; if ($status) { $failed = 1; return(-1); } led 1 delay drawclose; echo "******** RE/PP Test Suite Execution Completed ********" } tex_load { #report=3 mg_hq3_RegWr 0x50080 0x4c0004 mg_hq3_RegWr 0x50080 0x201 mg_wr_rss_reg -g0x112 -d0x00000004 mg_wr_rss_reg -g0x111 -d0x0004081b mg_wr_rss_reg -g0x180 -d0x00000180 mg_wr_rss_reg -g0x18a -d0x00000000 mg_wr_rss_reg -g0x18f -d0x00000000 mg_wr_rss_reg -g0x1a0 -d0x00000000 mg_wr_rss_reg -g0x1a1 -d0x00004006 mg_wr_rss_reg -g0x1a2 -d0x00000230 mg_wr_rss_reg -g0x1a7 -d0x00000000 mg_wr_rss_reg -g0x1a3 -d0x00000000 mg_wr_rss_reg -g0x1a4 -d0x00000000 mg_wr_rss_reg -g0x1a3 -d0x00000000 mg_wr_rss_reg -g0x1a5 -d0x00000000 mg_wr_rss_reg -g0x1a9 -d0x00000008 mg_wr_rss_reg -g0x1aa -d0x00000004 mg_wr_rss_reg -g0x1ab -d0x00000000 mg_wr_rss_reg -g0x1ac -d0x00000000 mg_wr_rss_reg -g0x153 -d0x00040008 mg_wr_rss_reg -g0x158 -d0x00040008 mg_wr_rss_reg -g0x159 -d0x00400080 mg_hq3_RegWr 0x50080 0x4a0204 mg_hq3_RegWr 0x50080 0x20 mg_hq3_RegWr 0x50080 0x4a0604 mg_hq3_RegWr 0x50080 0x4 mg_wr_rss_reg -g0x102 -d0x00005555 -e0x00000005 -p #mg_wr_rss_reg -g0x102 -d0x00000005 mg_wr_re_cmd -c 0x20 mg_wr_re_data -l 0xff0000ff -h 0x00ff00ff mg_wr_re_data -l 0x0000ffff -h 0xffffffff mg_wr_re_data -l 0xff0000ff -h 0x00ff00ff mg_wr_re_data -l 0x0000ffff -h 0xffffffff mg_wr_re_cmd -c 0x20 mg_wr_re_data -l 0x00ff00ff -h 0x0000ffff mg_wr_re_data -l 0xffffffff -h 0xff0000ff mg_wr_re_data -l 0x00ff00ff -h 0x0000ffff mg_wr_re_data -l 0xffffffff -h 0xff0000ff mg_wr_re_cmd -c 0x20 mg_wr_re_data -l 0x0000ffff -h 0xffffffff mg_wr_re_data -l 0xff0000ff -h 0x00ff00ff mg_wr_re_data -l 0x0000ffff -h 0xffffffff mg_wr_re_data -l 0xff0000ff -h 0x00ff00ff mg_wr_re_cmd -c 0x20 mg_wr_re_data -l 0xffffffff -h 0xff0000ff mg_wr_re_data -l 0x00ff00ff -h 0x0000ffff mg_wr_re_data -l 0xffffffff -h 0xff0000ff mg_wr_re_data -l 0x00ff00ff -h 0x0000ffff #report=4 } draw_tri_tex { #report=3 mg_wr_rss_reg -g0x110 -d0x00005000 mg_wr_rss_reg -g0x112 -d0x00000004 mg_wr_rss_reg -g0x111 -d0x00040813 mg_wr_rss_reg -g0x180 -d0x00014180 mg_wr_rss_reg -g0x190 -d0x00000000 mg_wr_rss_reg -g0x191 -d0x00000000 mg_wr_rss_reg -g0x190 -d0x00000000 mg_wr_rss_reg -g0x192 -d0x00000000 mg_wr_rss_reg -g0x18b -d0x00000000 mg_wr_rss_reg -g0x18c -d0x00008008 mg_wr_rss_reg -g0x17b -d0x00000000 mg_wr_rss_reg -g0x113 -d0xffffffff mg_wr_rss_reg -g0x114 -d0xffffffff mg_wr_rss_reg -g0x115 -d0x00000000 mg_wr_rss_reg -g0x142 -d0x00000000 mg_wr_rss_reg -g0x143 -d0x00000000 mg_wr_rss_reg -g0x144 -d0x00000000 mg_wr_rss_reg -g0x145 -d0x00000000 mg_wr_rss_reg -g0x146 -d0x00000000 mg_wr_rss_reg -g0x147 -d0x000004ff mg_wr_rss_reg -g0x148 -d0x000003ff mg_wr_rss_reg -g0x149 -d0x000004ff mg_wr_rss_reg -g0x14a -d0x000003ff mg_wr_rss_reg -g0x14b -d0x000004ff mg_wr_rss_reg -g0x14c -d0x000003ff mg_wr_rss_reg -g0x14d -d0x000004ff mg_wr_rss_reg -g0x14e -d0x000003ff mg_wr_rss_reg -g0x14f -d0x00000000 mg_wr_rss_reg -g0x156 -d0xffffffff mg_wr_rss_reg -g0x157 -d0xffffffff mg_wr_rss_reg -g0x159 -d0x00040000 mg_wr_rss_reg -g0x15a -d0xffffffff mg_wr_rss_reg -g0x15b -d0x000f0000 mg_wr_rss_reg -g0x160 -d0x00000000 mg_wr_rss_reg -g0x161 -d0x0c004203 mg_wr_rss_reg -g0x162 -d0x00000000 mg_wr_rss_reg -g0x163 -d0xfffbffff mg_wr_rss_reg -g0x164 -d0x00000000 mg_wr_rss_reg -g0x165 -d0x80000001 mg_wr_rss_reg -g0x165 -d0x58840000 mg_wr_rss_reg -g0x166 -d0x00000007 mg_wr_rss_reg -g0x167 -d0x0000ffff mg_wr_rss_reg -g0x168 -d0x0ffffff1 mg_wr_rss_reg -g0x169 -d0x00000007 mg_wr_rss_reg -g0x16a -d0x00000000 mg_wr_rss_reg -g0x16d -d0x000c8240 mg_wr_rss_reg -g0x16e -d0x0000031e mg_wr_rss_reg -g0x182 -d0x00000000 mg_wr_rss_reg -g0x183 -d0x00000000 mg_wr_rss_reg -g0x186 -d0x00000000 mg_wr_rss_reg -g0x18a -d0x00000000 mg_wr_rss_reg -g0x18f -d0x00000000 mg_wr_rss_reg -g0x80 -d0x00004000 mg_wr_rss_reg -g0x81 -d0x00000000 mg_wr_rss_reg -g0x82 -d0x00004000 mg_wr_rss_reg -g0x83 -d0x00000000 mg_wr_rss_reg -g0x84 -d0x0000000f mg_wr_rss_reg -g0x85 -d0x03fff000 mg_wr_rss_reg -g0x86 -d0x00000000 mg_wr_rss_reg -g0x87 -d0x00000000 mg_wr_rss_reg -g0x88 -d0x00000000 mg_wr_rss_reg -g0x89 -d0x00000000 mg_wr_rss_reg -g0x8a -d0x00000000 mg_wr_rss_reg -g0x8b -d0x00000000 mg_wr_rss_reg -g0x8c -d0x0000003f mg_wr_rss_reg -g0xc0 -d0x00000000 mg_wr_rss_reg -g0xc1 -d0x00000000 mg_wr_rss_reg -g0xc2 -d0x00000020 mg_wr_rss_reg -g0xc3 -d0x00000000 mg_wr_rss_reg -g0xc4 -d0x00000020 mg_wr_rss_reg -g0xc5 -d0x00000000 mg_wr_rss_reg -g0xc6 -d0x00000000 mg_wr_rss_reg -g0xc7 -d0x00000000 mg_wr_rss_reg -g0xc8 -d0x00000000 mg_wr_rss_reg -g0xc9 -d0x00000000 mg_wr_rss_reg -g0xca -d0x00000000 mg_wr_rss_reg -g0xcb -d0x00000000 mg_wr_rss_reg -g0x068 -d0x00000000 mg_wr_rss_reg -g0x069 -d0x00000000 mg_wr_rss_reg -g0x004 -d0x47400100 mg_wr_rss_reg -g0x005 -d0x47400100 mg_wr_rss_reg -g0x006 -d0x00000000 mg_wr_rss_reg -g0x007 -d0x00000000 mg_wr_rss_reg -g0x008 -d0x00000000 mg_wr_rss_reg -g0x009 -d0x00000000 mg_wr_rss_reg -g0x00a -d0x00000000 mg_wr_rss_reg -g0x00b -d0x00000000 mg_wr_rss_reg -g0x000 -d0x47400100 mg_wr_rss_reg -g0x001 -d0x47440000 mg_wr_rss_reg -g0x002 -d0x47440000 mg_wr_rss_reg -g0x003 -d0x47440000 mg_wr_rss_reg -g0x05c -d0x00fff000 mg_wr_rss_reg -g0x05d -d0x00fc1933 mg_wr_rss_reg -g0x05e -d0x00028f33 mg_wr_rss_reg -g0x05f -d0x00000000 mg_wr_rss_reg -g0x060 -d0x00000000 mg_wr_rss_reg -g0x061 -d0x00000000 mg_wr_rss_reg -g0x062 -d0xfffae19a mg_wr_rss_reg -g0x063 -d0xfffd70cd mg_wr_rss_reg -g0x064 -d0x00000000 mg_wr_rss_reg -g0x065 -d0x00051e66 mg_wr_rss_reg -g0x066 -d0x00000000 mg_wr_rss_reg -g0x067 -d0x00000000 mg_wr_rss_reg -g0x181 -d0x00002323 #report=4 } clr { mg0_clear_color } rdram_cur_value{ report=3 mg_wr_rss_reg -g 0x15c -d 0x2c000161 mg_wr_rss_reg -g 0x15d -d 0x4300 mg_wr_rss_reg -g 0x15c -d 0x2300000c mg_wr_rss_reg -g 0x15d -d 0x404080c2 mg_wr_rss_reg -g 0x15c -d 0x2c000161 mg_wr_rss_reg -g 0x15d -d 0x4200 report=4 } draw_tex_scene { mg_pon_puts -s "testing tex_load....\n\r"; tex_load; mg_pon_puts -s "testing draw_tri_tex....\n\r"; draw_tri_tex; mg_pon_puts -s "testing execbitrete....\n\r"; execbitrete; } rdram_mem { echo "------ Executing FRAME BUFFER Test Suite ------" # Z Buffer Test drawsetup if (mg_gfxconsole) mg_pon_puts -s "testing mg_dma_pp Z Buffer....\n\r"; $status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x0 -p3 if ($status) { $failed = 1; return (-1); } # Color Buffer Test if (mg_gfxconsole) mg_pon_puts -s "testing mg_dma_pp Color Buffer....\n\r"; $status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x240 -p3 if ($status) { $failed = 1; return (-1); } # Overlay Buffer Test if (mg_gfxconsole) mg_pon_puts -s "testing mg_dma_pp Overlay Buffer....\n\r"; $status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x1c0 -p3 if ($status) { $failed = 1; return (-1); } $tmp = mg_setnumre4s -q if ($tmp == 2) { # Display Buffer-CD Test if (mg_gfxconsole) mg_pon_puts -s "testing mg_dma_pp Buffer CD....\n\r"; $status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x320 -p3 if ($status) { $failed = 1; return (-1); } # ACC36 or AUX 0 Buffer if (mg_gfxconsole) mg_pon_puts -s "testing mg_dma_pp ACC36/AUX Buffer....\n\r"; $status = mg_dma_pp -r0 -e0 -w0 -d0 -b 0x0e0 -p3 if ($status) { $failed = 1; return (-1); } } echo "******** FRAME BUFFER Test Suite Execution Completed ********" } tram_mem { delay; echo "------ Executing TRAM Memory Test Suite ------" delay; mg_tram_rev_nobuff delay; $status = mg_dma_tram -m 3 -e 0 if ($status) { $failed = 1; return (-1); } delay $foo = mg_setnumre4s -q delay if ($foo == 2) { $status = mg_dma_tram -m 3 -e 0 -n 1 if ($status) { $failed = 1; return (-1); } } } re4flextest { echo "------ High Density Flex Connectivity Test ------" $status = mg_hq3 4 if ($status) { $failed = 1; } } mg_test_all { $failed = 0; if (mg_gfxconsole) { report=2; } else { report=2; } repeat 3 delay; gioslot; if (mg_gfxconsole) { mg_reset; delay; delay; resetcons; } else { allsetup; } buffon mg_pon_puts -s "Start mg_test_all test script ....\n\r"; delay; delay; mg_pon_puts -s "testing re4flextest....\n\r"; $status = re4flextest; if ($failed) { echo "Flex Test FAILED" resetcons; buffoff; return($status); } mg_pon_puts -s "testing hq3test....\n\r"; $status = hq3test; if ($failed) { echo "hq3test FAILED" return($status); } resetcons; gioslot; mg_reset; delay; delay; resetcons; mg_pon_puts -s "testing bkend....\n\r"; $status = bkend; chg_volt 1; ide_delay -s 15; if ($failed) { echo "bkend FAILED" resetcons; buffoff; return($status); } mg_pon_puts -s "testing ge_test....\n\r"; # resetcons; mg_reset; $ge_no = mg_queryGE; if ($ge_no == 2) # 2 GE system { echo "Testing 2GE system....\n" $status = tge_test; } if ($ge_no == 1) # 1 ge system { mg_pon_puts -s "testing ge11_0 ...\n\r"; echo "Testing 1GE system....\n" $status = ge0_test; mg_pon_puts -s "finished ge11_0 test ...\n\r"; } if ($failed) { echo "ge_test FAILED" resetcons; buffoff; return($status); } allsetup; buffon mg_pon_puts -s "\rtesting re4test....\n\r"; $status = re4test; if ($failed) { echo "re4test FAILED" resetcons; buffoff; return(-1); } mg_pon_puts -s "testing dmatest....\n\r"; $status = dmatest; if ($failed) { echo "dmatest FAILED" resetcons; buffoff; return($status); } mg_pon_puts -s "testing rdram_mem....\n\r"; $status = rdram_mem; if ($failed) { echo "RDRAM FAILED" resetcons; buffoff; return($status); } mg_pon_puts -s "testing repp_test....\n\r"; $status = repp_test; if ($failed) { echo "repp_test FAILED" resetcons; buffoff; return($status); } delay; allsetup ; delay; delay; mg_reset; delay; resetcons; buffoff; buffon; echo "Testing TRAM memory" repeat 3 delay; mg_pon_puts -s "testing tram_mem....\n\r"; $status = tram_mem; if ($failed) { echo "tram test FAILED" resetcons; buffoff; return(-1); } echo "TRAM Memory Test passed" mg_pon_puts -s "testing tex_draw_test....\n\r"; $status = tex_draw_test if ($failed) { echo "tex_draw_test FAILED" resetcons; buffoff; return(-1); } mg_pon_puts -s "All tests have passed....\n\r"; echo " All tests have passed" delay; delay; mg_reset; resetcons; buffoff; report=4 } hang { p 0xbfbd9878 0xff7fff7f forever { dt1 dt2 } } ############################################################ # IBM Function Test Script .... Begin ############################################################ echo " WELCOME TO THE IMPACT FUNCTION TESTS" echo "" $mgras_do = mg_probe; if ($mgras_do) { $failed = 0; gioslot if ($tmp) { echo "Testing Impact boards set." mg_test_all; } } ############################################################ # IBM Function Test Script .... End ############################################################